/* 下部3カード特別レイアウト - 横幅2倍、高さ調整 */
.stats-grid-bottom {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important; /* 左右に2つのカラム */
    grid-template-rows: 1fr 1fr !important; /* 2行のグリッド */
    gap: 20px;
    max-width: 1140px !important;
    margin: 60px auto 0;
}

/* 下部カード共通スタイル */
.stat-card-bottom {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 200px; /* 最小高さを設定 */
    width: 95%;
    margin: 0 auto;
}

.stat-card-bottom:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* 勤続年数カード（左上） */
.tenure-card {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 30px !important;
    position: relative;
}

.tenure-icon {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.tenure-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    margin-top: 0;
}

.tenure-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2A3B56;
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
    position: absolute;
    top: 30px;
    left: 0;
}

.tenure-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tenure-item {
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.tenure-label {
    font-size: 1.6rem;
    color: #666;
    font-weight: 500;
}

.tenure-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2A3B56;
}

/* 研修時間カード（左下） */
.training-card {
    grid-column: 1 !important;
    grid-row: 2 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 30px !important;
    position: relative;
}

.training-icon {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.training-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    margin-top: 0;
}

.training-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2A3B56;
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
    position: absolute;
    top: 30px;
    left: 0;
}

.training-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.training-item {
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.training-label {
    font-size: 1.6rem;
    color: #666;
    font-weight: 500;
}

.training-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2A3B56;
}

/* 資格取得者数カード（右側2倍高さ） */
.certification-card {
    grid-column: 2 !important;
    grid-row: 1 / 3 !important; /* 2行分を占める */
    display: flex;
    flex-direction: column;
    min-height: 500px !important; /* 高さを明示的に指定 */
}

.certification-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2A3B56;
    text-align: center;
    margin-bottom: 30px;
}

.certification-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    padding: 0 15px;
}

.cert-section {
    display: flex;
    gap: 15px;
}

.cert-category-label {
    writing-mode: vertical-rl;
    text-orientation: upright;
    background: #2A3B56;
    color: white;
    padding: 10px 8px;
    border-radius: 8px;
    font-size: 1.4rem;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.cert-items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.cert-other-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cert-item-new {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    transition: background-color 0.3s ease;
}

.cert-item-new:hover {
    background: #f8f9fa;
}

.cert-award-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.cert-text {
    font-size: 1.4rem;
    font-weight: 500;
    color: #2A3B56;
    flex: 1;
}

.cert-number {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2A3B56;
    min-width: 40px;
    text-align: right;
}

/* 768px以下のレスポンシブ対応 */
@media (max-width: 768px) {
    /* 下部カードのグリッドレイアウトを1列に変更 */
    .stats-grid-bottom {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
        gap: 20px;
        padding: 0 10px;
        margin: 40px auto 0;
    }
    
    /* カードサイズを画面幅に応じて変動 */
    .stat-card-bottom {
        width: calc(100% - 20px);
        min-height: auto;
        padding: 25px 20px;
        box-sizing: border-box;
    }
    
    /* 各カードのグリッド位置をリセット */
    .tenure-card,
    .training-card,
    .certification-card {
        grid-column: 1 !important;
        grid-row: auto !important;
    }
    
    /* 資格取得者数カードの高さ制限を解除 */
    .certification-card {
        min-height: auto !important;
        grid-row: auto !important;
    }
    
    /* タイトルの位置調整 */
    .tenure-title,
    .training-title {
        position: static;
        font-size: clamp(1.4rem, 4vw, 1.8rem);
        margin-bottom: 15px;
        top: auto;
        left: auto;
    }
    
    /* アイコンサイズを画面幅に応じて調整 */
    .tenure-icon,
    .training-icon {
        width: min(100px, 30vw);
        height: min(100px, 30vw);
    }
    
    /* コンテンツレイアウトを縦並びに */
    .tenure-content,
    .training-content {
        flex-direction: column;
        gap: 15px;
        margin-top: 10px;
    }
    
    /* 勤続年数・研修時間カードのレイアウトを上部6カードと同じに */
    .tenure-card,
    .training-card {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 20px 15px !important;
    }
    
    /* タイトルを最初に */
    .tenure-title,
    .training-title {
        order: 1 !important;
    }
    
    /* 統計データを2番目に */
    .tenure-content,
    .training-content {
        order: 2 !important;
        flex-direction: column !important;
        align-items: center !important;
        margin: 10px 0 !important;
    }
    
    /* アイコンを最後に */
    .tenure-icon,
    .training-icon {
        order: 3 !important;
        margin-top: 10px !important;
    }
    
    /* 統計アイテムの中央揃え */
    .tenure-stats,
    .training-stats {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 10px !important;
    }
    
    .tenure-item,
    .training-item {
        display: flex !important;
        flex-direction: row !important;
        align-items: baseline !important;
        gap: 8px !important;
        justify-content: center !important;
    }
    
    /* テキストサイズの調整 */
    .tenure-value,
    .training-value {
        font-size: clamp(1.6rem, 5vw, 2rem);
    }
    
    .tenure-label,
    .training-label {
        font-size: clamp(1.2rem, 3.5vw, 1.4rem);
    }
    
    /* 資格取得者数カードの調整 */
    .certification-title {
        font-size: clamp(1.4rem, 4vw, 1.6rem);
        margin-bottom: 20px;
    }
    
    .certification-content {
        padding: 0 10px;
        gap: 15px;
    }
    
    /* 資格カテゴリラベルの調整 */
    .cert-category-label {
        font-size: 1.2rem;
        padding: 8px 6px;
        min-width: 35px;
    }
    
    /* 資格項目のテキストサイズ調整 */
    .cert-text {
        font-size: clamp(1.1rem, 3vw, 1.3rem);
    }
    
    .cert-number {
        font-size: clamp(1.1rem, 3vw, 1.3rem);
        min-width: 35px;
    }
    
    /* アイコンサイズ調整 */
    .cert-award-icon {
        width: 18px;
        height: 18px;
    }
    
    /* 項目の余白調整 */
    .cert-item-new {
        padding: 6px 10px;
        gap: 8px;
    }
    
    .cert-section {
        gap: 10px;
    }
    
    .cert-items-list {
        gap: 6px;
    }
}

