/* Job Categories Widget Styles */
.job-categories-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    padding: 30px;
    margin-bottom: 20px;
    max-width: 1300px;
    width: 100%;
    position: relative;
}

.job-categories-header {
    margin-bottom: 28px;
    text-align: center;
}

.job-categories-header h2 {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.job-categories-header p {
    color: #718096;
    font-size: 0.9rem;
}

.job-categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.job-category-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.job-category-item:hover {
    border-color: #4f46e5;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.08);
    transform: translateY(-2px);
}

.job-category-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.job-category-details {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.job-category-name {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
}

.job-category-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4f46e5;
    background: #eef2ff;
    padding: 6px 14px;
    border-radius: 20px;
    min-width: 70px;
    text-align: center;
}

/* Color variations for icons */
.job-icon-tech { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.job-icon-business { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.job-icon-design { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.job-icon-health { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.job-icon-finance { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.job-icon-remote { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); color: #555; }
.job-icon-engineering { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); color: #555; }
.job-icon-education { background: linear-gradient(135deg, #a3bded 0%, #6991c7 100%); }
.job-icon-default { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }

/* View More Button */
.job-categories-view-more {
    text-align: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    display: none;
}

.job-categories-view-more.active {
    display: block;
}

#jobViewAllBtn {
    background: transparent;
    border: 1px solid #4f46e5;
    color: #4f46e5;
    padding: 10px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

#jobViewAllBtn:hover {
    background: #4f46e5;
    color: white;
}

/* ===== POPUP MODAL STYLES ===== */
.job-categories-modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.job-categories-modal.active {
    display: flex;
    opacity: 1;
}

.job-categories-modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
}

.job-categories-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.job-categories-modal-header h3 {
    color: #2d3748;
    font-size: 1.3rem;
    margin: 0;
}

.job-categories-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #718096;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}

.job-categories-close:hover {
    color: #4f46e5 !important;
}

.job-categories-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.job-categories-modal-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.job-categories-modal-item:hover {
    background: white;
    border-color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.job-categories-modal-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.job-categories-modal-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3748;
    flex-grow: 1;
}

.job-categories-modal-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4f46e5;
    background: #eef2ff;
    padding: 5px 10px;
    border-radius: 15px;
    min-width: 50px;
    text-align: center;
}

/* Responsive */
@media (max-width: 640px) {
    .job-categories-grid {
        grid-template-columns: 1fr;
    }
    
    .job-categories-container {
        padding: 24px 20px;
    }
    
    .job-categories-modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .job-categories-modal-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) {
    .job-categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== INSTANT POPUP FIXES ===== */
#jobViewAllBtn {
    cursor: pointer !important;
    transition: none !important;
    animation: none !important;
}

.job-categories-modal {
    display: none !important;
    opacity: 0;
    transition: opacity 0.15s ease !important;
}

.job-categories-modal.active {
    display: flex !important;
    opacity: 1 !important;
}

/* Disable all transitions for instant response */
#jobViewAllBtn,
.job-categories-modal,
.job-categories-modal-content {
    transition-duration: 0.1s !important;
}

/* Force GPU acceleration */
.job-categories-modal.active {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}