/* 検索結果ページ専用CSS */

/* 企業画像コンテナ */
.corporation-image {
    width: 200px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    padding: 10px;
}

/* 企業画像フレーム */
.image_frame {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}

/* 条件バッジ（保険加入、ISO等） */
.span_condition {
    font-size: 0.7rem !important;
    padding: 0.2rem 0.4rem !important;
    margin-right: 0.3rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

/* 業者コンテナのスタイル */
.company-container {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.sample_box9_index_content {
    background-color: transparent;
    margin-bottom: 0;
}

.company-tags {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

/* 業者HPボタンのスペース調整 */
.btn-warning {
    margin-right: 1rem;
}

/* ==== 包括的レイアウト改善 ==== */

/* 1. 視覚的階層の改善 */
.sample_box6_index_name {
    font-size: 1.3rem !important;
    font-weight: 700;
    line-height: 1.3;
    color: #2d3748;
    transition: all 0.2s ease;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
}

.sample_box6_index_name:hover {
    color: #667eea;
    text-decoration: none;
    transform: translateX(2px);
}

/* 説明文の読みやすさ向上 */
.font-size-13-space {
    line-height: 1.7;
    color: #4a5568;
    font-size: 0.9rem;
    margin-top: 0.75rem;
    text-align: justify;
}

/* 閲覧回数の視認性向上 */
.font-size-14 {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    margin-top: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.font-size-14 strong {
    font-size: 1.4rem;
    font-weight: 700;
    color: #667eea;
    display: block;
    margin-bottom: 0.2rem;
}

.font-size-10 {
    color: #718096;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 2. バッジの配置統一と改善 */
.span_condition {
    font-size: 0.65rem !important;
    padding: 0.3rem 0.6rem !important;
    margin-right: 0.4rem;
    margin-bottom: 0.3rem;
    border-radius: 12px !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-block;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s ease;
}

.span_condition:hover {
    transform: translateY(-1px);
}

/* バッジコンテナの改善 */
.ms-1.mt-1 {
    margin-top: 0.75rem !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
}

/* 3. 業者HPボタンの全体レイアウト統一 */
.btn-warning {
    background-color: #f6ad55;
    border: 1px solid #ed8936;
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    font-size: 0.85rem;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-warning:hover {
    background-color: #ed8936;
    border-color: #dd6b20;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(237, 137, 54, 0.2);
    text-decoration: none;
}

.btn-warning:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(246, 173, 85, 0.3);
}

/* 4. 細かな調整 */
.company-container {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

/* 画像コンテナの改善 */
.corporation-image {
    width: 200px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.image_frame {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    transition: transform 0.2s ease;
}

.corporation-image:hover .image_frame {
    transform: scale(1.02);
}

/* 画像がない場合の改善 */
.corporation-image span {
    color: #a0aec0;
    font-size: 0.8rem;
    text-align: center;
    font-weight: 500;
}

/* 5. 業種タグエリアの改善 */
.company-tags {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid #e2e8f0;
    position: relative;
}

.company-tags::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #cbd5e0 50%, transparent 100%);
}

/* 業種タグボタンの改善 */
.company-tags .btn_up_design {
    background-color: #ffffff;
    color: #4a5568;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    margin: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    letter-spacing: 0.2px;
}

.company-tags .btn_up_design:hover {
    background-color: #667eea;
    color: #ffffff;
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.2);
    text-decoration: none;
}

/* 6. フォーカス状態の改善 */
.company-tags .btn_up_design:focus,
.sample_box6_index_name:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
    border-radius: 4px;
}

/* 7. アニメーションの統一 */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* 8. レスポンシブ改善 */
@media (max-width: 768px) {
    .sample_box6_index_name {
        font-size: 1.1rem !important;
        word-break: break-word;
        hyphens: auto;
    }
    
    .corporation-image {
        width: 150px;
        height: 110px;
    }
    
    .company-tags ul {
        gap: 0.4rem;
    }
    
    .company-tags .btn_up_design {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
        min-height: 32px;
    }
    
    .btn-warning {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .font-size-14 {
        margin-top: 0.5rem;
        padding: 0.6rem;
    }
}

@media (max-width: 576px) {
    .company-container {
        margin-bottom: 1.2rem;
        border-radius: 8px;
    }
    
    .sample_box6_index_name {
        font-size: 1rem !important;
        line-height: 1.4;
    }
    
    .font-size-13-space {
        font-size: 0.85rem;
        line-height: 1.6;
    }
    
    .corporation-image {
        width: 120px;
        height: 90px;
    }
    
    .span_condition {
        font-size: 0.6rem !important;
        padding: 0.2rem 0.4rem !important;
    }
}

/* 9. アクセシビリティの改善 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 10. 印刷時の調整 */
@media print {
    .company-container {
        box-shadow: none;
        border: 1px solid #000;
        break-inside: avoid;
    }
    
    .btn-warning,
    .company-tags .btn_up_design {
        color: #000 !important;
        background: transparent !important;
        border: 1px solid #000 !important;
    }
}

/* ==== 業種表示のモダン・シンプル・落ち着いたスタイル ==== */

/* 業種タグエリア全体の改善 */
.company-tags {
    background-color: #f8fafb;
    border-top: 1px solid #e1e5e9;
}

/* 業種タグリストの改善 */
.company-tags ul {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.company-tags li {
    margin: 0;
    padding: 0;
}

/* 業種タグボタンの改善（検索結果ページ内のみ） */
.company-tags .btn_up_design {
    background-color: #ffffff;
    color: #4a5568;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    margin: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.company-tags .btn_up_design:hover {
    background-color: #f7fafc;
    color: #2d3748;
    border-color: #cbd5e0;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    text-decoration: none;
}

.company-tags .btn_up_design:focus {
    outline: none;
    border-color: #90cdf4;
    box-shadow: 0 0 0 2px rgba(144, 205, 244, 0.3);
}

/* プライマリカラーの業種タグ（特別な場合） */
.company-tags .btn-primary.btn_up_design {
    background-color: #667eea;
    color: #ffffff;
    border-color: #667eea;
}

.company-tags .btn-primary.btn_up_design:hover {
    background-color: #5a67d8;
    border-color: #5a67d8;
    color: #ffffff;
}

/* 業種タグが空の場合の表示 */
.company-tags:empty::after {
    content: "業種情報なし";
    color: #a0aec0;
    font-size: 0.85rem;
    font-style: italic;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .company-tags ul {
        gap: 0.5rem;
    }
    
    .company-tags .btn_up_design {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .company-tags ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
    
    .company-tags .btn_up_design {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* ==== 絞込検索エリアの左右余白拡張 ==== */
.search-layout {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(560px, 1fr);
    gap: 2rem;
    max-width: 1220px;
    margin: 0 auto;
    align-items: flex-start;
}

@media (min-width: 1400px) {
    .search-layout {
        grid-template-columns: minmax(280px, 360px) minmax(640px, 1fr);
    }
}

@media (max-width: 1199px) {
    .search-layout {
        grid-template-columns: 1fr;
    }
}

.filter-column {
    width: 100%;
}

.results-column {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.filter-panel {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 1.75rem 1.75rem 2rem;
    border-radius: 18px;
    border: 1px solid #e4ecf4;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, #ffffff 0%, #f5f8fd 100%);
}

.filter-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.filter-scroll {
    border: 1px solid #dce5f0;
    border-radius: 14px;
    padding: 0.85rem 1rem;
    background-color: #ffffff;
    overflow-y: auto;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
}

.filter-scroll-tall {
    max-height: 240px;
}

.filter-scroll-medium {
    max-height: 180px;
}

.filter-scroll::-webkit-scrollbar {
    width: 6px;
}

.filter-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(148, 163, 184, 0.8);
    border-radius: 999px;
}

.filter-actions .btn {
    min-width: 150px;
    padding: 0.65rem 2rem;
    border-radius: 999px;
}

/* ==== 絞込検索エリアの文字サイズ調整 ==== */

/* 絞込検索のタイトル文字サイズと太さ */
.sample_box9_index .sample_box6_index {
    font-size: 1rem !important;
    font-weight: 700 !important;
}

/* フォームラベルの文字サイズと太さ */
.sample_box9_index .form-label.small {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
}

/* チェックボックスラベルの文字サイズ */
.sample_box9_index .form-check-label {
    font-size: 0.85rem !important;
}

/* カテゴリタイトル（業種の大分類）の文字サイズと太さ */
.sample_box9_index strong.text-muted {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
}

/* 地図リンクの文字サイズ */
.sample_box9_index .font-size-12 {
    font-size: 0.85rem !important;
}

/* 入力フィールドの文字サイズ */
.sample_box9_index .form-control {
    font-size: 0.9rem !important;
}

/* 検索ボタンの文字サイズ */
.sample_box9_index .btn {
    font-size: 0.9rem !important;
}

/* 件数表示のスタイル */
.sample_box9_index .form-check-label .text-muted {
    font-size: 0.7rem !important;
    font-weight: 400 !important;
    color: #6c757d !important;
    float: right !important;
    margin-left: 0.5rem !important;
}

/* チェックボックスラベルを flexbox に */
.sample_box9_index .form-check-label {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
}