/* ========================================
   Faculty Page Styles
   ======================================== */

/* Faculty Page用のcontent-area上書き */
.content-area.faculty-page {
    display: block !important;
    padding: 0 !important;
}

/* グリッド設定 
   PC (1025px以上): 4列
*/
.faculty-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
    width: 100%;
}

/* Faculty Member Card */
.faculty-member {
    background: white;
    padding: 20px 15px;
    /* border-left: 4px solid var(--tab-active-start);*/
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-width: 0; /* フレックスアイテム内での文字はみ出し防止 */
    height: 100%; /* 高さを揃える */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.faculty-member:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-left-color: var(--tab-active-end);
}

/* Faculty Name */
.faculty-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--tab-active-start);
    margin-bottom: 8px;
    line-height: 1.4;
    /* word-break: keep-all;  <-- これが原因でした。削除します。 */
    overflow-wrap: break-word; /* <-- 代わりにこれを追加。長い単語も枠内で折り返します。 */
    word-wrap: break-word; /* IEなどの古いブラウザ用 */
}

/* Faculty Affiliation */
.faculty-affiliation {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0;
    word-break: break-all; /* 長い所属も枠内に収める */
}

/* Section Title for Categories */
.category-title {
    font-size: 24px;
    color: var(--tab-active-start);
    margin: 40px 0 20px;
    padding-left: 15px;
    border-left: 5px solid var(--tab-active-start);
    font-weight: bold;
    background-color: rgb(242, 242, 242) ;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet: 3列 (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .faculty-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .faculty-name {
        font-size: 16px; /* タブレットで少しフォントサイズを小さく調整 */
    }
}

/* Mobile: 2列 (767px以下) */
@media (max-width: 767px) {
    .content-area.faculty-page {
        padding: 20px 10px !important;
    }
    
    .faculty-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .faculty-member {
        padding: 15px 10px;
        /*border-left-width: 3px;*/
    }
    
    .faculty-name {
        font-size: 14px; /* スマホでさらにフォントサイズを小さく調整 */
        margin-bottom: 5px;
    }
    
    .faculty-affiliation {
        font-size: 11px;
    }

    .category-title {
        font-size: 20px;
        margin: 30px 0 15px;
    }
}