/* ================================================
   SES・SIer企業一覧セクション（2カラムレイアウト）
   修正版 - SP表示順序対応
   ================================================ */

   .companies-section {
    padding: 60px 20px;
    background-color: #ffffff;
}

.companies-container {
    max-width: 1400px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ページヘッダー（個別ページ用） */
.page-header {
    padding: 40px 40px 20px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    background-color: #fafafa;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #333333;
}

.page-description {
    font-size: 15px;
    color: #666666;
    margin: 0;
    line-height: 1.6;
}

/* 2カラムラッパー */
.companies-wrapper {
    display: flex;
    gap: 0;
}

/* 各セクション（ヘッダー+テーブル+CTA） */
.company-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ses-section {
    border-right: 1px solid #e0e0e0;
}

/* セクションヘッダー */
.section-header {
    padding: 35px 30px 28px;
    color: #ffffff;
    text-align: center;
    background-color: #4a5568;
}

.section-header-sier {
    background-color: #718096;
}

/* 単一ヘッダー（個別ページ用） */
.single-header {
    padding: 35px 30px 28px;
    color: #ffffff;
    text-align: center;
    background-color: #4a5568;
}

.single-header-sier {
    background-color: #718096;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.header-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 18px;
    letter-spacing: 0.5px;
}

.header-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.stats-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.stats-label {
    opacity: 0.9;
    font-weight: 400;
}

.stats-value {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
}

/* 単一テーブルラッパー（個別ページ用） */
.single-table-wrapper {
    padding: 0;
}

/* テーブル部分 */
.companies-table-wrapper {
    overflow-x: auto;
    padding: 0;
    flex: 1;
}

.companies-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.companies-table thead {
    background-color: #fafafa;
    position: sticky;
    top: 0;
    z-index: 10;
}

.companies-table th {
    padding: 16px 15px;
    text-align: left;
    font-weight: 600;
    color: #333333;
    white-space: nowrap;
    border-bottom: 2px solid #e0e0e0;
    font-size: 13px;
}

.companies-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.companies-table tbody tr:hover {
    background-color: #fafafa;
}

.companies-table tbody tr:last-child {
    border-bottom: none;
}

.companies-table td {
    padding: 14px 15px;
    color: #333333;
}

/* 列の幅設定 */
.col-rank {
    width: 70px;
    text-align: center;
    font-weight: 600;
    color: #4a5568;
    font-size: 13px;
}

.col-company {
    width: auto;
    font-weight: 500;
}

.col-count {
    width: 100px;
    text-align: center;
}

/* 求人数バッジ */
.count-badge {
    display: inline-block;
    padding: 5px 14px;
    color: #ffffff;
    border-radius: 16px;
    font-weight: 600;
    font-size: 13px;
    min-width: 35px;
    text-align: center;
}

.count-badge-ses {
    background-color: #4a5568;
}

.count-badge-sier {
    background-color: #718096;
}

/* 空の状態 */
.companies-empty {
    padding: 60px 30px;
    text-align: center;
    color: #999999;
    font-size: 15px;
}

/* テーブル内CTA */
.table-cta {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    background-color: #fafafa;
}

.btn-view-list {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-view-list-ses {
    background-color: #4a5568;
}

.btn-view-list-ses:hover {
    background-color: #2d3748;
    transform: translateY(-1px);
}

.btn-view-list-sier {
    background-color: #718096;
}

.btn-view-list-sier:hover {
    background-color: #4a5568;
    transform: translateY(-1px);
}

/* 戻るリンク */
.back-to-top-link {
    padding: 30px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

.btn-back-to-top {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background-color: #4a5568;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-back-to-top:hover {
    background-color: #2d3748;
    transform: translateY(-1px);
}

/* company-list.php用のメインコンテナ */
.company-list-main {
    min-height: 100vh;
    background-color: #ffffff;
}

/* レスポンシブ対応 */
@media screen and (max-width: 1024px) {
    /* SP時は縦並び */
    .companies-wrapper {
        flex-direction: column;
    }

    .ses-section {
        border-right: none;
        border-bottom: 2px solid #e0e0e0;
    }

    /* 各セクションの順序は自然な順序のまま */
    /* .ses-section → .sier-section の順序で表示される */
}

@media screen and (max-width: 768px) {
    .companies-section {
        padding: 40px 15px;
    }

    .page-header {
        padding: 30px 20px 15px;
    }

    .page-title {
        font-size: 22px;
    }

    .page-description {
        font-size: 14px;
    }

    .section-header,
    .single-header {
        padding: 25px 20px 20px;
    }

    .header-title {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .header-stats {
        justify-content: space-between;
        width: 100%;
        gap: 15px;
        flex-wrap: nowrap;
    }

    .stats-item {
        font-size: 13px;
    }

    .stats-value {
        font-size: 18px;
    }

    .companies-table {
        font-size: 13px;
    }

    .companies-table th {
        padding: 12px 10px;
        font-size: 12px;
    }

    .companies-table td {
        padding: 11px 10px;
    }

    .col-rank {
        width: 55px;
        font-size: 12px;
    }

    .col-count {
        width: 85px;
    }

    .count-badge {
        padding: 4px 11px;
        font-size: 12px;
    }

    .btn-view-list,
    .btn-back-to-top {
        padding: 11px 24px;
        font-size: 13px;
    }

    .table-cta {
        padding: 18px;
    }
}

@media screen and (max-width: 480px) {
    .page-title {
        font-size: 20px;
    }

    .page-description {
        font-size: 13px;
    }

    .header-title {
        font-size: 16px;
    }

    .stats-item {
        font-size: 12px;
    }

    .stats-value {
        font-size: 16px;
    }

    .companies-table {
        font-size: 12px;
    }

    .companies-table th {
        padding: 10px 8px;
        font-size: 11px;
    }

    .companies-table td {
        padding: 9px 8px;
    }

    .col-rank {
        width: 45px;
        font-size: 11px;
    }

    .col-count {
        width: 75px;
    }

    .count-badge {
        padding: 3px 9px;
        font-size: 11px;
    }

    .btn-view-list,
    .btn-back-to-top {
        padding: 10px 20px;
        font-size: 12px;
    }

    .table-cta,
    .back-to-top-link {
        padding: 15px;
    }
}

/* プリント用スタイル */
@media print {
    .companies-section {
        padding: 20px;
    }

    .btn-view-list,
    .btn-back-to-top,
    .table-cta {
        display: none;
    }

    .companies-table tbody tr:hover {
        background-color: transparent;
    }
}