/* ============================
   case-archive.css
   案件一覧ページ スタイル
   最小フォントサイズ: 1rem
   ============================ */

.ca-archive-wrap {
    width: 100%;
    max-width: 100%;
    padding: 0 0 3rem;
    box-sizing: border-box;
}

/* main-content__innerの幅を上書き */
.post-type-archive-case .main-content__inner {
    width: 100%;
    max-width: 100%;
    float: none;
}

/* ===== ページヘッダー ===== */
.ca-archive-header {
    text-align: center;
    margin-bottom: 2rem;
}
.ca-archive-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 6px;
}
.ca-archive-sub {
    font-size: 1rem;
    color: #9ca3af;
}

/* ===== フィルターパネル ===== */
.ca-filter-panel {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.ca-filter-form { display: flex; flex-direction: column; gap: 12px; }
.ca-filter-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.ca-filter-row-multi { gap: 10px; }
.ca-filter-row-bottom {
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
    flex-wrap: wrap;
    gap: 12px;
}

.ca-filter-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 140px;
}
.ca-filter-field-wide { flex: 2; min-width: 200px; }
.ca-filter-field-check {
    justify-content: flex-end;
    flex: unset;
    min-width: unset;
}

.ca-filter-label {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}
.ca-filter-input,
.ca-filter-select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    color: #111;
    background: #fff;
    transition: border-color .15s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}
.ca-filter-input:focus,
.ca-filter-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.ca-filter-search-wrap {
    position: relative;
}
.ca-filter-search-wrap .ca-filter-input {
    padding-right: 40px;
}
.ca-filter-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    pointer-events: none;
}
.ca-filter-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 36px;
}
.ca-filter-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: #374151;
    cursor: pointer;
    padding: 10px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    white-space: nowrap;
    transition: border-color .15s, background .15s;
}
.ca-filter-check-label:hover { border-color: #93c5fd; background: #eff6ff; }
.ca-filter-check-label input { accent-color: #2563eb; width: 16px; height: 16px; }

/* 並び替えボタン */
.ca-filter-sort-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.ca-filter-sort-label {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}
.ca-filter-sort-btns {
    display: flex;
    gap: 6px;
}
.ca-sort-btn {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 99px;
    padding: 7px 16px;
    font-size: 1rem;
    color: #374151;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.ca-sort-btn:hover { border-color: #93c5fd; color: #2563eb; }
.ca-sort-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    font-weight: 600;
}

/* 検索ボタン群 */
.ca-filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.ca-filter-reset {
    font-size: 1rem;
    color: #9ca3af;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: color .15s, background .15s;
}
.ca-filter-reset:hover { color: #374151; background: #f9fafb; }
.ca-filter-submit {
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.ca-filter-submit:hover { background: #15803d; }

/* ===== 検索結果ヘッダー ===== */
.ca-result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.ca-result-count {
    font-size: 1rem;
    color: #6b7280;
}
.ca-result-count strong {
    color: #111;
    font-size: 1.1rem;
    font-weight: 700;
}
.ca-active-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.ca-active-filter-tag {
    font-size: 1rem;
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    padding: 3px 10px;
    border-radius: 99px;
    font-weight: 500;
}

/* ===== カードグリッド ===== */
.ca-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 2rem;
}

/* ===== 案件カード ===== */
.ca-offer-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    transition: border-color .15s, transform .15s;
    display: flex;
    flex-direction: column;
}
.ca-offer-card:hover {
    border-color: #93c5fd;
    transform: translateY(-2px);
}
.ca-offer-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}
.ca-offer-card-link:hover { text-decoration: none; color: inherit; }

/* サムネイル */
.ca-offer-thumb {
    position: relative;
    height: 140px;
    background: #f3f4f6;
    overflow: hidden;
}
.ca-offer-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ca-offer-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: #9ca3af;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}
.ca-offer-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 4px;
}
.ca-offer-badge {
    font-size: 1rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}
.ca-offer-badge-legal { background: #dcfce7; color: #15803d; }
.ca-offer-badge-new   { background: #fef9c3; color: #854d0e; }

/* カード本文 */
.ca-offer-body {
    padding: 12px 14px;
    flex: 1;
}
.ca-offer-genre {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 4px;
}
.ca-offer-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ca-offer-company {
    font-size: 1rem;
    color: #9ca3af;
    margin-bottom: 8px;
}

/* 星評価 */
.ca-offer-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
}
.ca-offer-stars { color: #f59e0b; font-size: 1rem; letter-spacing: 1px; }
.ca-offer-rating-num { font-size: 1rem; font-weight: 700; color: #111; }
.ca-offer-rating-count { font-size: 1rem; color: #9ca3af; }
.ca-offer-no-review { font-size: 1rem; color: #d1d5db; }

/* 情報グリッド */
.ca-offer-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.ca-offer-info-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #f9fafb;
    border-radius: 6px;
    padding: 6px 8px;
}
.ca-offer-info-label {
    font-size: 1rem;
    color: #9ca3af;
}
.ca-offer-info-value {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}
.ca-offer-info-income { color: #1d4ed8; }

/* CTA フッター */
.ca-offer-footer {
    padding: 10px 14px;
    border-top: 1px solid #f3f4f6;
    text-align: right;
}
.ca-offer-cta {
    font-size: 1rem;
    font-weight: 600;
    color: #2563eb;
}

/* ===== 結果なし ===== */
.ca-no-results {
    text-align: center;
    padding: 4rem 1rem;
    background: #f9fafb;
    border-radius: 16px;
    border: 1.5px dashed #e5e7eb;
}
.ca-no-results-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.ca-no-results-text { font-size: 1rem; color: #6b7280; margin-bottom: 1.25rem; }
.ca-no-results-reset {
    display: inline-block;
    background: #2563eb;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    transition: background .15s;
}
.ca-no-results-reset:hover { background: #1d4ed8; color: #fff; text-decoration: none; }

/* ===== ページネーション ===== */
.ca-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.ca-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    color: #374151;
    text-decoration: none;
    transition: all .15s;
    background: #fff;
}
.ca-pagination .page-numbers:hover { border-color: #2563eb; color: #2563eb; }
.ca-pagination .page-numbers.current {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    font-weight: 700;
}
.ca-pagination .page-numbers.dots {
    border: none;
    background: none;
    cursor: default;
}

/* ===== レスポンシブ ===== */
@media (max-width: 900px) {
    .ca-card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .ca-card-grid { grid-template-columns: 1fr; }
    .ca-filter-row-bottom { flex-direction: column; align-items: stretch; }
    .ca-filter-sort-group { flex-direction: column; align-items: flex-start; }
    .ca-filter-actions { justify-content: flex-end; }
    .ca-filter-field { min-width: 100%; }
}
