/* 求人カード専用CSS */

/* 求人カードグリッド */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* 求人カード本体 */
.job-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 320px;
}

.job-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: #e2e8f0;
}

/* カードヘッダー */
.job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 25px 0;
    position: relative;
}

.job-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.job-label {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.label-new {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    animation: pulse 2s infinite;
}

.label-expiring {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.label-beginner {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.label-high-income {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

@keyframes pulse { 
    0%, 100% { transform: scale(1); } 
    50% { transform: scale(1.05); } 
}

.job-favorite {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: #d1d5db;
}

.job-favorite:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: scale(1.1);
}

.heart-icon {
    display: inline;
}

.heart-icon-filled {
    display: none;
}

.job-favorite.favorited .heart-icon {
    display: none;
}

.job-favorite.favorited .heart-icon-filled {
    display: inline;
    color: #ef4444;
}

/* カードコンテンツ */
.job-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 25px 20px;
}

.job-title {
    margin: 20px 0 15px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.job-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s ease;
}

.job-title a:hover { 
    color: #667eea; 
}

.job-company {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    line-height: 1.4;
}

.company-icon { 
    font-size: 16px; 
}

.job-meta {
    margin-bottom: 15px;
}

.job-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 15px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.3;
}

.meta-icon {
    font-size: 14px;
}

.job-location {
    color: #6b7280;
}

.job-type {
    color: #6b7280;
}

.job-station {
    color: #059669;
    font-weight: 500;
}

.job-salary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #059669;
    background: #ecfdf5;
    padding: 12px 16px;
    border-radius: 12px;
    border-left: 4px solid #10b981;
    line-height: 1.3;
}

.salary-icon { 
    font-size: 18px; 
}

.job-excerpt {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.job-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.job-feature {
    display: inline-block;
    padding: 4px 10px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    border: 1px solid #e2e8f0;
}

/* 特定の特徴に色を付ける */
.job-feature.feature-在宅ワーク可,
.job-feature.feature-リモートワーク {
    background: #dbeafe;
    color: #1e40af;
    border-color: #bfdbfe;
}

.job-feature.feature-未経験歓迎,
.job-feature.feature-未経験ok {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.job-feature.feature-高収入 {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.job-feature.feature-交通費支給 {
    background: #e0e7ff;
    color: #3730a3;
    border-color: #c7d2fe;
}

.job-additional-features {
    margin-bottom: 15px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 12px;
    color: #6b7280;
    border-left: 3px solid #d1d5db;
}

.additional-features-label {
    margin-right: 8px;
}

.additional-features-count {
    font-weight: 600;
    color: #374151;
}

.job-expiry {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 15px;
    font-size: 13px;
    padding: 8px 12px;
    background: #fef7cd;
    border-radius: 8px;
    border-left: 3px solid #f59e0b;
}

.expiry-icon {
    font-size: 14px;
}

.expiry-text {
    line-height: 1.3;
}

/* カードフッター */
.job-card-footer {
    padding: 0 25px 25px;
    margin-top: auto;
}

.job-actions { 
    display: flex; 
    gap: 12px; 
}

.job-btn {
    flex: 1;
    display: inline-block;
    padding: 14px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    line-height: 1.3;
}

.job-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}

.job-btn-secondary {
    padding: 14px 20px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.3;
    white-space: nowrap;
}

.job-btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* クイックプレビュー用のハイライト（非表示） */
.job-quick-highlights {
    margin-top: 10px;
}

.highlight-item {
    display: inline-block;
    padding: 3px 8px;
    margin: 2px;
    background: #f0f9ff;
    color: #0369a1;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
}

/* フォールバックカード */
.job-card-fallback {
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 320px;
    overflow: hidden;
}

.job-card-fallback .job-card-header {
    padding: 18px 20px 0;
}

.job-card-fallback .job-card-content {
    padding: 0 20px 15px;
    flex: 1;
}

.job-card-fallback .job-card-footer {
    padding: 0 20px 20px;
    margin-top: auto;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .jobs-grid { 
        grid-template-columns: 1fr; 
        gap: 25px;
        margin-top: 30px;
    }
    
    .job-card {
        min-height: 300px;
    }
    
    .job-card-header {
        padding: 18px 20px 0;
    }
    
    .job-card-content {
        padding: 0 20px 18px;
    }
    
    .job-card-footer {
        padding: 0 20px 20px;
    }
    
    .job-title {
        font-size: 17px;
        margin: 15px 0 12px;
    }
    
    .job-salary {
        padding: 10px 14px;
        font-size: 15px;
    }
    
    .job-actions {
        gap: 10px;
    }
    
    .job-btn {
        padding: 12px 18px;
        font-size: 13px;
    }
    
    .job-btn-secondary {
        padding: 12px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .jobs-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .job-card { 
        margin: 0;
        border-radius: 16px;
        min-height: 280px;
    }
    
    .job-card-header {
        padding: 15px 18px 0;
    }
    
    .job-card-content {
        padding: 0 18px 15px;
    }
    
    .job-card-footer {
        padding: 0 18px 18px;
    }
    
    .job-title {
        font-size: 16px;
        margin: 12px 0 10px;
    }
    
    .job-company {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .job-meta span {
        font-size: 12px;
        margin-right: 12px;
        margin-bottom: 6px;
    }
    
    .job-salary {
        padding: 10px 12px;
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .job-excerpt {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .job-features {
        gap: 6px;
        margin-bottom: 12px;
    }
    
    .job-feature {
        padding: 3px 8px;
        font-size: 11px;
    }
    
    .job-actions {
        gap: 8px;
    }
    
    .job-btn {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .job-btn-secondary {
        padding: 12px 14px;
        font-size: 12px;
    }
    
    .job-labels {
        gap: 6px;
    }
    
    .job-label {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .job-favorite {
        font-size: 18px;
        padding: 6px;
    }
}

/* 特殊な状態のカード */
.job-card.featured {
    border: 2px solid #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.job-card.urgent {
    border: 2px solid #f59e0b;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.15);
}

.job-card.new {
    position: relative;
}

.job-card.new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #ee5a52);
    border-radius: 20px 20px 0 0;
}

/* ローディング状態 */
.job-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.job-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}