/* 招聘列表自定义样式 */
.job-list-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
}

/* 自定义滚动条样式 */
.job-list-wrapper::-webkit-scrollbar {
    height: 6px;
}

.job-list-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.job-list-wrapper::-webkit-scrollbar-thumb {
    background: #2c5aa0;
    border-radius: 3px;
}

.job-list-wrapper::-webkit-scrollbar-thumb:hover {
    background: #1e4080;
}

.job-list-container {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-width: 800px; /* 确保最小宽度以保持对齐 */
}

/* 表头样式 */
.job-list-header {
    display: flex;
    background: #2c5aa0;
    color: #fff;
    font-weight: bold;
    padding: 15px 0;
    border-bottom: 2px solid #1e4080;
}

.job-header-item {
    flex: 1;
    text-align: center;
    padding: 0 8px;
    font-size: 14px;
    min-width: 0;
}

.job-header-item.job-title {
    flex: 2;
    min-width: 120px;
}

.job-header-item.job-location {
    flex: 1;
    min-width: 80px;
}

.job-header-item.job-salary {
    flex: 1;
    min-width: 80px;
}

.job-header-item.job-count {
    flex: 0.8;
    min-width: 60px;
}

.job-header-item.job-gender {
    flex: 0.8;
    min-width: 60px;
}

.job-header-item.job-age {
    flex: 1;
    min-width: 80px;
}

.job-header-item.job-time {
    flex: 1.2;
    min-width: 90px;
}

/* 列表项样式 */
.job-list-item {
    border-bottom: 1px solid #e5e5e5;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.job-list-item:last-child {
    border-bottom: none;
}

.job-list-item:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.job-list-item.expanded {
    background-color: #f8f9fa;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.job-item-row {
    display: flex;
    align-items: center;
    padding: 15px 0;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.job-item-row:hover {
    background: linear-gradient(90deg, rgba(44, 90, 160, 0.02) 0%, rgba(44, 90, 160, 0.05) 100%);
}

.job-list-item.expanded .job-item-row {
    background: linear-gradient(90deg, rgba(44, 90, 160, 0.05) 0%, rgba(44, 90, 160, 0.08) 100%);
}

.job-item-cell {
    flex: 1;
    text-align: center;
    padding: 0 8px;
    font-size: 14px;
    color: #333;
    min-width: 0;
    word-wrap: break-word;
}

.job-item-cell.job-title {
    flex: 2;
    min-width: 120px;
    font-weight: 500;
    color: #2c5aa0;
}

.job-item-cell.job-location {
    flex: 1;
    min-width: 80px;
}

.job-item-cell.job-salary {
    flex: 1;
    min-width: 80px;
}

.job-item-cell.job-count {
    flex: 0.8;
    min-width: 60px;
}

.job-item-cell.job-gender {
    flex: 0.8;
    min-width: 60px;
}

.job-item-cell.job-age {
    flex: 1;
    min-width: 80px;
}

.job-item-cell.job-time {
    flex: 1.2;
    min-width: 90px;
}

.job-expand-btn {
    width: 40px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.expand-icon {
    font-size: 12px;
    color: #666;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.job-list-item.expanded .expand-icon {
    transform: rotate(180deg);
}

.job-expand-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.job-expand-btn:hover {
    transform: scale(1.1);
}

/* 详情内容样式 */
.job-detail-content {
    background: #f8f9fa;
    border-top: 1px solid #e5e5e5;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 0;
    opacity: 0;
    display: block !important; /* 覆盖内联样式 */
}

.job-list-item.expanded .job-detail-content {
    max-height: 1000px;
    opacity: 1;
}

.job-detail-inner {
    padding: 20px;
    transform: translateY(-10px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.job-list-item.expanded .job-detail-inner {
    transform: translateY(0);
}

.job-detail-inner h4 {
    margin: 0 0 15px 0;
    color: #2c5aa0;
    font-size: 16px;
    font-weight: bold;
    border-bottom: 2px solid #2c5aa0;
    padding-bottom: 8px;
    display: inline-block;
}

.job-content {
    line-height: 1.6;
    color: #555;
    font-size: 14px;
}

.job-content p {
    margin-bottom: 10px;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.job-list-item {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.job-list-item:nth-child(1) { animation-delay: 0.1s; }
.job-list-item:nth-child(2) { animation-delay: 0.2s; }
.job-list-item:nth-child(3) { animation-delay: 0.3s; }
.job-list-item:nth-child(4) { animation-delay: 0.4s; }
.job-list-item:nth-child(5) { animation-delay: 0.5s; }
.job-list-item:nth-child(6) { animation-delay: 0.6s; }
.job-list-item:nth-child(7) { animation-delay: 0.7s; }
.job-list-item:nth-child(8) { animation-delay: 0.8s; }

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .job-list-wrapper {
        margin-top: 10px;
        overflow-x: visible; /* 移动端不需要水平滚动 */
    }

    .job-list-container {
        border-radius: 4px;
        min-width: auto; /* 移除最小宽度限制 */
    }

    .job-list-header {
        display: none;
    }

    .job-list-item {
        margin-bottom: 15px;
        border-radius: 8px;
        border: 1px solid #e5e5e5;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .job-item-row {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
        position: relative;
    }

    .job-item-cell {
        text-align: left;
        padding: 6px 0;
        border-bottom: 1px solid #f0f0f0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 14px;
        min-width: auto;
        flex: none;
    }

    .job-item-cell:last-child {
        border-bottom: none;
    }
    .job-item-cell.job-title:before {
        content: "职位名称：";
        font-weight: bold;
        color: #2c5aa0;
        margin-right: 10px;
    }

    .job-item-cell.job-location:before {
        content: "工作地点：";
        font-weight: bold;
        color: #666;
        margin-right: 10px;
    }

    .job-item-cell.job-salary:before {
        content: "工资待遇：";
        font-weight: bold;
        color: #666;
        margin-right: 10px;
    }

    .job-item-cell.job-count:before {
        content: "招聘人数：";
        font-weight: bold;
        color: #666;
        margin-right: 10px;
    }

    .job-item-cell.job-gender:before {
        content: "性别要求：";
        font-weight: bold;
        color: #666;
        margin-right: 10px;
    }

    .job-item-cell.job-age:before {
        content: "年龄要求：";
        font-weight: bold;
        color: #666;
        margin-right: 10px;
    }

    .job-item-cell.job-time:before {
        content: "发布时间：";
        font-weight: bold;
        color: #666;
        margin-right: 10px;
    }
    
    .job-expand-btn {
        position: absolute;
        top: 15px;
        right: 15px;
        width: 32px;
        height: 32px;
        background: #2c5aa0;
        border-radius: 50%;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    .job-expand-btn .expand-icon {
        color: #fff;
        font-size: 12px;
    }

    .job-detail-inner {
        padding: 15px;
        margin-top: 10px;
        border-top: 1px solid #e5e5e5;
    }

    .job-item-cell.job-title {
        font-weight: bold;
        color: #2c5aa0;
        font-size: 16px;
        padding-right: 50px;
        padding-bottom: 10px;
        border-bottom: 2px solid #f0f0f0;
        margin-bottom: 8px;
    }

    .job-item-cell.job-title:before {
        display: none; /* 移动端职位名称不显示标签 */
    }

    /* 移动端其他样式优化 */
    .job-item-cell {
        word-break: break-word;
    }

    .job-detail-content {
        background: #f8f9fa;
        border-radius: 0 0 8px 8px;
    }

    .job-content {
        font-size: 14px;
        line-height: 1.6;
    }
}

/* 桌面端样式确保 */
@media screen and (min-width: 769px) {
    .job-list-wrapper {
        overflow-x: auto; /* 桌面端保持水平滚动 */
    }

    .job-list-container {
        border-radius: 8px;
        min-width: 800px; /* 桌面端最小宽度 */
    }

    /* 确保桌面端样式正常 */
    .job-list-item {
        margin-bottom: 0;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }

    .job-item-row {
        flex-direction: row;
        padding: 15px 0;
    }

    .job-item-cell:before {
        display: none; /* 桌面端不显示标签 */
    }

    .job-expand-btn {
        position: static;
        width: 40px;
        height: auto;
        background: transparent;
        border-radius: 0;
        box-shadow: none;
    }

    .job-expand-btn .expand-icon {
        color: #666;
        font-size: 12px;
    }

    .job-detail-inner {
        padding: 20px;
        margin-top: 0;
        border-top: none;
    }
}

/* 空状态样式 */
.job-list-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    background: #fff;
}

.job-list-empty .empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ddd;
}

.job-list-empty .empty-text {
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 500;
}

.job-list-empty .empty-desc {
    font-size: 14px;
    color: #bbb;
}

/* 加载状态样式 */
.job-list-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.job-list-loading .loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2c5aa0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 改善点击体验 */
.job-item-row:active {
    background-color: #e8f0fe;
}

.job-expand-btn:hover {
    background: #1e4080;
    transform: scale(1.1);
}

/* 详情内容样式优化 */
.job-content ul,
.job-content ol {
    padding-left: 20px;
    margin-bottom: 15px;
}

.job-content li {
    margin-bottom: 5px;
}

.job-content strong {
    color: #2c5aa0;
}

.job-content h1,
.job-content h2,
.job-content h3,
.job-content h4,
.job-content h5,
.job-content h6 {
    color: #2c5aa0;
    margin-top: 20px;
    margin-bottom: 10px;
}
