@charset "utf-8";

/* 의과학연구소 연구소소개 — 연혁 / 인사말 / 규정 / 구성 / 기기보유현황 / 시설보유현황 6탭 한 페이지 통합
 * (Figma 752:29577, 752:29663, 752:28080, 752:30015) — sub05010101(노화과학연구소)과 동일 패턴 */

/* 6탭 — 웹 3열 2줄 배치. 1024px 이하는 basic.css 의 2열 → 1열 흐름을 그대로 따른다.
 * basic.css 는 한 줄 배치 전제라 :last-child 에만 오른쪽 테두리를 준다. 3열에서는
 * 3의 배수째가 줄 끝이고 2행부터는 위 테두리가 겹치므로 데스크톱 한정으로 재지정 */
@media (min-width: 1025px) {
    nav.tab-nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tab-nav .tab-btn:nth-child(3n) {
        border-right: 1px solid var(--color-border-base);
    }

    .tab-nav .tab-btn:nth-child(n+4) {
        border-top: 0;
    }
}

.institute-panel[hidden] {
    display: none;
}

.institute-panel {
    padding-top: 10px;
}

/* ── 연구소 연혁 ────────────────────────────────────────── */
.institute-history {
    display: flex;
    flex-direction: column;
    gap: 40px;
}
/* 연혁 상단 비주얼 */
.institute-history-photo {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    height: clamp(260px, 25vw, 260px);
    overflow: hidden;
    box-sizing: border-box;

    background-image:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0) 35%,
            rgba(255, 255, 255, 0.18) 50%,
            rgba(255, 255, 255, 0.82) 75%,
            rgba(255, 255, 255, 0.96) 100%
        ),
        url('/pages/medicine_jnu/img/sub/sub05010201.png');

    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
	 padding-right: 50px;
}

/* 텍스트 영역 */
.institute-history-photo__content {
    position: relative;
    z-index: 2;
    width: 54%;
    padding: 40px 55px 40px 30px;
    box-sizing: border-box;
    text-align: right;
}

/* 의과학연구소 */
.institute-history-photo__title {
    display: block;
    margin: 0 0 18px;
    color: #1f594d;
    font-size: clamp(38px, 4vw, 42px);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.045em;    text-align: right;
    text-decoration: overline;
}

/* 연구소 소개 문구 */
.institute-history-photo__desc {
       margin: 0;
    color: #222;
    font-size: clamp(16px, 1.45vw, 18px);
    line-height: 1.6;
    font-weight: 400;
    letter-spacing: -0.020em;
    word-break: keep-all;
    text-align: right;
}

/* 연혁 표 — 년/월 열 고정 폭 */
.board-table--history col:first-child {
    width: 200px;
}

/* ── 소장 인사말 (사진 없는 텍스트형 greeting) ───────────── */
.greeting {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

.greeting--text {
    justify-content: center;
}

.greeting--text .greeting-content {
    width: 100%;
}

.greeting-content {
    flex: 1;
    min-width: 0;
}

.greeting-lead {
    font-size: var(--font-size-heading-lg);
    line-height: var(--line-height-heading-lg);
    font-weight: var(--font-weight-regular);
    color: var(--color-black);
    padding: 0 0 20px;
}

.greeting-lead-name {
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
}

.greeting-divider {
    display: block;
    border: none;
    border-top: 1px solid var(--color-border-base);
}

.greeting-text {
    padding: 40px 0 60px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-size: var(--font-size-body-md);
    line-height: var(--line-height-body-md);
    color: var(--color-text-body);
}

.greeting-signature {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 16px;
    font-size: 20px;
    font-weight: var(--font-weight-regular);
    color: var(--color-black);
}

.greeting-signature-name {
    font-size: 32px;
    font-weight: var(--font-weight-semibold);
}

/* ── 연구소 규정 ──────────────────────────────────────────── */
/* 규정명(불릿 제목) 아래 제·개정 이력 */
.institute-rules-doc-history {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--color-text-muted);
}

/* 부칙 목록 (제·개정일 + 시행 문구) */
.institute-rules-addenda {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text-body);
}

.institute-rules-addenda > li {
    display: flex;
    gap: 16px;
}

.institute-rules-addenda-date {
    flex-shrink: 0;
    min-width: 160px;
    font-weight: var(--font-weight-medium);
    color: var(--color-text-title1);
}

/* ── 연구소 구성 (조직도, Figma 752:30015) ───────────────── */
.institute-org-chart {
    --org-line: var(--color-gray300);
    --org-gap-y: 48px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
}

.institute-org-chart .org-lead {
    width: 220px;
    margin: 0;
    padding: 18px 20px;
    border-radius: 4px;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 18px;
    font-weight: var(--font-weight-medium);
    text-align: center;
}

.institute-org-chart .org-row {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
    width: 100%;
    max-width: 780px;
    margin: var(--org-gap-y) auto 0;
}

.institute-org-chart .org-row > li {
    position: relative;
    padding: 18px 20px;
    border-radius: 0px;
    background: var(--color-gray50);
    text-align: center;
    list-style: none;
	    border: solid 1px #e1e1e1;
}

.institute-org-chart .org-row--mid > li {
    font-size: 18px;
    color: var(--color-text-title2);
}

.institute-org-chart .org-row--sub > li {
    font-size: 16px;
    color: var(--color-text-body);
}

/* 위 레벨에서 내려오는 중앙 세로선 (소장→mid, 총무부장→sub) */
.institute-org-chart .org-row::before {
    content: '';
    position: absolute;
    left: 50%;
    top: calc(var(--org-gap-y) * -1);
    width: 2px;
    height: var(--org-gap-y);
    background: var(--org-line);
    transform: translateX(-50%);
}

/* 첫 카드 ~ 끝 카드 가로선 */
.institute-org-chart .org-row::after {
    content: '';
    position: absolute;
    top: calc(var(--org-gap-y) / -2);
    left: calc((100% - 120px) / 6);
    right: calc((100% - 120px) / 6);
    height: 2px;
    background: var(--org-line);
}

/* 각 카드 위 세로선 */
.institute-org-chart .org-row > li::before {
    content: '';
    position: absolute;
    left: 50%;
    top: calc(var(--org-gap-y) / -2);
    width: 2px;
    height: calc(var(--org-gap-y) / 2);
    background: var(--org-line);
    transform: translateX(-50%);
}

/* ── 기기 보유현황 (기자재 대장) ─────────────────────────── */
.equipment-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.equipment-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: collapse;
    border-top: 1px solid var(--color-gray300);
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text-title1);
}

.equipment-table th,
.equipment-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--color-gray200);
    border-right: 1px solid var(--color-gray200);
    vertical-align: middle;
    text-align: center;
    word-break: keep-all;
}

.equipment-table th:last-child,
.equipment-table td:last-child {
    border-right: 0;
}

.equipment-table thead th {
    background: var(--color-gray100);
    font-weight: var(--font-weight-semibold);
    white-space: nowrap;
}

.equipment-table tbody td:nth-child(3) {
    text-align: left;
}

.equipment-table tbody td:nth-child(8) {
    text-align: right;
    white-space: nowrap;
}

.equipment-table-col-no { width: 90px; }
.equipment-table-col-name { width: 220px; }
.equipment-table-col-date { width: 100px; }
.equipment-table-col-model { width: 200px; }
.equipment-table-col-unit { width: 56px; }
.equipment-table-col-acct { width: 92px; }
.equipment-table-col-price { width: 110px; }
.equipment-table-col-qty { width: 56px; }
.equipment-table-col-dept { width: 92px; }

/* ── 시설 보유현황 ───────────────────────────────────────── */
/* 3행 스펙표 — 전체 폭, 행머리 열만 200px 고정 */
.board-table--facility col:first-child {
    width: 200px;
}

.board-table--facility tbody th {
    background: var(--color-gray50);
    font-weight: var(--font-weight-medium);
}

/* ── 반응형 ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .greeting--text .greeting-content {
        max-width: none;
    }
}

@media (max-width: 768px) {
    .board-table--history col:first-child {
        width: 120px;
    }

    .greeting-signature {
        flex-wrap: wrap;
        gap: 8px 12px;
    }

    .institute-rules-addenda > li {
        flex-direction: column;
        gap: 2px;
    }

    .institute-org-chart .org-row {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 280px;
    }

    .institute-org-chart .org-row::before,
    .institute-org-chart .org-row::after,
    .institute-org-chart .org-row > li::before {
        display: none;
    }
}

@media (max-width: 768px) {

    .institute-history-photo {
         display: none;
    }
}