/* =======================================================
    IIC Lab Website Style - Activities Page
   ======================================================= */

/* 1. 글로벌 스타일 및 변수 정의
------------------------------------------------------- */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
    --bg-color: #F8F9FA;
    --card-bg: #FFFFFF;
    --text-color: #212529;
    --text-muted: #495057;
    --accent-color: #0056b3;
    --accent-darker: #004085;
    --accent-light: #e6f0ff;
    --border-color: #DEE2E6;
    --shadow-color: rgba(0, 0, 0, 0.07);
    --font-primary: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
}

/* 2. 기본 레이아웃 및 푸터 고정
------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 80px;
    width: auto;
    object-fit: contain;
}

.nav-link {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1.5rem;
    margin-left: 1.75rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-color);
    background-color: var(--accent-light);
}

main.container {
    padding-top: 4rem;
    padding-bottom: 4rem;
    flex: 1;
}

/* 3. Activities 페이지 전용 스타일
------------------------------------------------------- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.main-title {
    font-size: 2.25rem;
    font-weight: 800;
}

.btn {
    font-weight: 600;
    display: inline-block;
    border: 1px solid transparent;
    padding: 0.7rem 1.4rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-color);
    color: #fff;
}
.btn-primary:hover {
    background-color: var(--accent-darker);
}

.table-container {
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 8px 30px var(--shadow-color);
    overflow: hidden;
}

/* 💡 [수정됨] 테이블 너비 고정 및 셀 간격 정돈 */
.activity-table {
    width: 100%;
    table-layout: fixed; /* 셀들이 제멋대로 늘어나지 않고 지정된 비율을 엄격하게 지키도록 설정 */
    border-collapse: collapse;
    text-align: left;
}

/* 💡 [수정됨] 각 열(Column)별 명시적 너비 및 정렬 배분 */
.activity-table th:nth-child(1), .activity-table td:nth-child(1) { width: 14%; text-align: center; } /* 활동 기간 */
.activity-table th:nth-child(2), .activity-table td:nth-child(2) { width: 11%; text-align: center; } /* 구분 */
.activity-table th:nth-child(3), .activity-table td:nth-child(3) { width: 23%; } /* 활동명 */
.activity-table th:nth-child(4), .activity-table td:nth-child(4) { width: 20%; } /* 참가자 */
.activity-table th:nth-child(5), .activity-table td:nth-child(5) { width: 17%; } /* 상세 내용 */
.activity-table th:nth-child(6), .activity-table td:nth-child(6) { width: 15%; text-align: center; } /* 수상/성과 */

.activity-table th, .activity-table td {
    padding: 1.1rem 0.8rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle; /* 💡 상하 중앙 정렬로 높낮이 균형 맞춤 */
    word-break: keep-all;   /* 💡 한글 단어 단위 줄바꿈으로 가독성 극대화 */
}

.activity-table thead th {
    background-color: #f1f3f5;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

.activity-table tbody tr:last-child td {
    border-bottom: none;
}

.activity-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* 💡 [수정됨] 셀별 상세 텍스트 제어 스타일 */
.date-cell {
    white-space: nowrap; /* 날짜 숫자(~ 포함)가 중간에 끊겨서 내려가는 현상 방지 */
    font-size: 0.88rem;
    line-height: 1.4;
}

.title-cell { 
    font-weight: 600; 
    font-size: 0.95rem;
}

.participants-cell { 
    font-size: 0.9rem; 
    color: var(--text-muted);
}

.details-cell { 
    font-size: 0.88rem; 
    color: var(--text-muted); 
    line-height: 1.5; 
}
.details-cell strong { 
    color: var(--text-color); 
}

.award-cell { 
    font-size: 0.9rem;
    white-space: nowrap; /* 수상 내역이 길어져 줄바꿈되는 것 방지 */
    overflow: hidden;
    text-overflow: ellipsis;
}

.no-data { text-align: center; padding: 4rem 0; color: #868e96; }

.badge {
    display: inline-block;
    padding: 0.3em 0.7em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 1rem;
    color: #fff;
    white-space: nowrap;
}
.badge.type-1 { background-color: #007bff; }
.badge.type-2 { background-color: #28a745; }
.badge.type-3 { background-color: #fd7e14; }
.badge.type-4 { background-color: #dc3545; }

.actions-cell { text-align: right; }
.btn-edit { background-color: #17a2b8; color: white; padding: 0.5rem 1rem; }
.btn-delete { background-color: #dc3545; color: white; padding: 0.5rem 1rem; }

/* 4. 푸터
------------------------------------------------------- */
.footer {
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 4rem;
    background-color: #343a40;
    color: #adb5bd;
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer strong {
    color: #f8f9fa;
}