﻿/* ==================== ROOT COLORS (ensure defined) ==================== */
:root {
    --primary: #0d6efd;
    --navy: #012970;
    --white: #ffffff;
    --text: #444444;
    --light-gray: #f8f9fa;
}

/* ==================== GLOBAL TEXT WRAPPING (PREVENT OVERFLOW) ==================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Apply to ALL text elements */
h1, h2, h3, h4, h5, h6,
p, span, label, small, .lead,
.btn, .job-title, .job-subtitle,
.form-label, .form-check-label,
.filter-panel h5, .recent-panel h5 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.5;
}

/* Single-line truncation */
.text-ellipsis,
.job-title,
.filter-panel h5,
.form-label,
.view-btn {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* Multi-line truncation (e.g. job description) */
.text-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==================== JOBS APP LAYOUT ==================== */
.jobs-app {
    padding: 40px 0 60px;
    margin-top: 2rem;
}

/* ==================== FILTER PANEL ==================== */
.filter-panel {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1), rgba(13, 110, 253, 0.25));
    border: 1px solid rgba(13, 110, 253, 0.2);
    border-radius: 12px;
    padding: 24px;
    height: calc(100vh - 100px);
    position: sticky;
    top: 80px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

    .filter-panel::-webkit-scrollbar {
        display: none;
    }

    .filter-panel h5 {
        color: var(--navy);
        font-weight: 600;
        font-size: 1.1rem;
        margin-bottom: 1rem;
        padding-bottom: 8px;
        border-bottom: 2px solid rgba(13, 110, 253, 0.2);
    }

.form-label {
    font-weight: 500;
    color: var(--navy);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.form-select,
.form-check-label {
    font-size: 0.9rem;
    color: var(--text);
}

/* ==================== JOB CARD ==================== */
.job-card {
    background: linear-gradient(135deg, #e3ecff, #cfd9f9);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

    .job-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    }

.job-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 8px;
    line-height: 1.4;
}

.job-subtitle {
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 14px;
    flex: 1;
}

    .job-meta span {
        display: flex;
        align-items: center;
        gap: 6px;
        min-width: 120px;
    }

    .job-meta i {
        color: var(--primary);
        font-size: 0.95rem;
    }

.job-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #666;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
}

.view-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 7px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

    .view-btn:hover {
        background: var(--navy);
        transform: translateY(-1px);
    }

/* ==================== RECENT PANEL ==================== */
.recent-panel {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    height: calc(100vh - 100px);
    position: sticky;
    top: 80px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

    .recent-panel::-webkit-scrollbar {
        display: none;
    }

    .recent-panel h5 {
        color: var(--navy);
        font-weight: 600;
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

/* ==================== RESPONSIVE FIXES ==================== */
@media (max-width: 992px) {
    .filter-panel,
    .recent-panel {
        height: auto;
        position: static;
        margin-bottom: 30px;
        overflow-y: visible;
    }

        .filter-panel h5,
        .recent-panel h5 {
            font-size: 1rem;
        }

    .job-card {
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .jobs-app {
        padding: 30px 0 50px;
    }

    .filter-panel,
    .recent-panel {
        padding: 20px;
    }

    .job-title {
        font-size: 1.15rem;
    }

    .job-meta span {
        flex: 1 1 100%;
        min-width: auto;
    }
}

@media (max-width: 576px) {
    .job-meta {
        flex-direction: column;
        gap: 8px;
    }

    .job-footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .view-btn {
        width: 100%;
        text-align: center;
    }
}
