@charset "utf-8";

/* 공통 폰트 및 설정 */
#history_wrap {
    width: 100%;
    font-family: 'Pretendard', -apple-system, sans-serif;
    color: #111;
    padding-bottom: 100px;
}

#history_wrap .inner {
    max-width: 1000px; /* 본문 폭을 적당히 좁게 해서 가독성 높임 */
    margin: 0 auto;
    padding: 0 20px;
}

/* --- [섹션 1] 페이지 헤더 --- */
.page_header_sec {
    padding: 100px 0 60px;
    text-align: center;
}
.page_tit {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
}
.page_desc {
    font-size: 18px;
    color: #666;
}

/* --- [섹션 2] 타임라인 --- */
.history_timeline {
    margin-bottom: 120px;
    border-top: 1px solid #000; /* 연혁 시작을 알리는 굵은 선 */
}

/* 연도별 그룹 */
.year_group {
    display: flex; /* 좌(연도) 우(리스트) 배치 */
    padding-top: 50px;
    padding-bottom: 50px;
    border-bottom: 1px solid #eee; /* 연도별 구분선 */
}

/* 왼쪽: 연도 (2025) */
.year_label {
    width: 150px;
    font-size: 40px;
    font-weight: 800;
    color: #000;
    flex-shrink: 0; /* 줄어들지 않음 */
}

/* 오른쪽: 이벤트 리스트 */
.event_list {
    flex-grow: 1;
    padding-left: 40px;
    list-style: none;
    margin: 0;
}

.event_list li {
    display: flex;
    margin-bottom: 30px;
    align-items: baseline; /* 날짜와 글자 높이 맞춤 */
}

/* 날짜 (11.27) */
.event_list .date {
    width: 80px;
    font-size: 18px;
    font-weight: 700;
    color: #444;
    flex-shrink: 0;
}

/* 내용 텍스트 */
.event_list .txt_box {
    font-size: 17px;
    line-height: 1.6;
    color: #222;
}

.event_list .event_tit { margin: 0; }
.event_list .event_sub { margin-top: 5px; font-size: 15px; color: #888; }

/* 뱃지 스타일 ([대상 수상] 같은 강조) */
.badge {
    font-weight: 600;
}
.badge.highlight {
    color: var(--primary, #0055ff); /* 파란색 강조 */
    font-weight: 700;
}

/* --- [섹션 3] 인증서 갤러리 --- */
.sec_tit {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 40px;
    padding-left: 10px;
    border-left: 5px solid #000; /* 제목 옆 포인트 바 */
}

.gallery_grid {
    display: grid;
    /* 화면 크기에 따라 자동으로 열 개수 조절 (최소 200px) */
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.gal_item {
    text-align: center;
    cursor: pointer;
}

/* 썸네일 이미지 */
.gal_item img {
    width: 100%;
    height: 280px; /* 썸네일 세로 높이 고정 (깔끔하게 보임) */
    object-fit: cover; /* 이미지가 찌그러지지 않고 꽉 차게 */
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
    background: #fff;
    padding: 10px; /* 액자 같은 여백 */
}

.gal_item:hover img {
    transform: translateY(-5px); /* 둥실 떠오름 */
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: #aaa;
}

.gal_cap {
    margin-top: 10px;
    font-size: 15px;
    color: #555;
    font-weight: 500;
}


/* --- [기능] 라이트박스 팝업 모달 --- */
.modal_overlay {
    display: none; /* 기본 숨김 */
    position: fixed;
    z-index: 1001;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6); /* 배경 어둡게 */
    overflow: hidden;
    justify-content:center;align-items:center;flex-direction:column; /* 이미지와 캡션을 세로로 배치 */
}

.modal_content {
    display: block;
    max-width: 90%;
    max-height: 80vh; /* 화면 높이의 80%까지만 */
    box-shadow:0 0 20px rgba(0,0,0,0.5);
    border-radius: 5px;
    animation: zoom 0.3s;
}

#caption {
    margin: 15px auto 0;
    display: block;
    width: 100%;
    text-align: center;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
}

.close_btn {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close_btn:hover { color: #fff; }

.prev_btn, .next_btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px; /* 정확한 수직 중앙 정렬 */
    color: white;
    font-weight: bold;
    font-size: 40px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none; /* 드래그 방지 */
    z-index: 1002; /* 이미지보다 위에 떠야 함 */
}

/* 오른쪽 버튼 위치 */
.next_btn {
    right: 20px; /* 화면 오른쪽 끝에서 약간 띄움 */
    border-radius: 3px 0 0 3px;
}

/* 왼쪽 버튼 위치 */
.prev_btn {
    left: 20px; /* 화면 왼쪽 끝에서 약간 띄움 */
    border-radius: 3px 0 0 3px;
}

/* 마우스 올렸을 때 배경색 */
.prev_btn:hover, .next_btn:hover {
    background-color: rgba(0,0,0,0.8);
}

/* 팝업 줌 애니메이션 */
@keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}


/* --- 반응형 (모바일) --- */
@media (max-width: 768px) {
    .page_tit { font-size: 32px; }
    
    .year_group { display: block; } /* 세로로 쌓기 */
    .year_label { margin-bottom: 20px; border-bottom: 2px solid #000; width: 100%; padding-bottom: 10px; }
    .event_list { padding-left: 0; }
    
    .event_list li { flex-direction: column; } /* 날짜 위, 내용 아래 */
    .event_list .date { margin-bottom: 5px; color: var(--primary, blue); }
}