@charset "utf-8";

/* ============================================
 * board.css — 게시판 + 테이블
 * ============================================ */

table, th, td {
    border: 0px;
    border-spacing: 0;
    border-style: none;
}

/* ============================================
 * Board Table (콘텐츠 테이블 공용 — 교육과정 등)
 * ============================================ */
.board-table-head {
    margin-bottom: 16px;
}

/* 한 페이지에 타이틀+테이블 섹션이 여러 개 이어질 때(예: 보직교수/행정업무) 섹션 간 간격 */
.board-table-wrap + .board-table-head {
    margin-top: var(--board-gap);
}

/* 타이틀 옆에 한 줄짜리 우측 날짜 배지(.board-table-note)만 나란히 놓을 때 전용.
 * 기본 .board-table-head는 그대로 두는 이유 — .board-table-desc(목록)나
 * 여러 줄 각주형 .board-table-note(sub02040200 등)는 타이틀 아래 블록으로 쌓여야 해서
 * 여기서 flex로 바꾸면 깨짐 */
.board-table-head--inline {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.board-table-head--inline .board-table-note {
    margin-top: 0;
    flex-shrink: 0;
}

.board-table-title {
    display: flex;
    align-items: center;
    font-size: var(--font-size-heading-sm);
    font-weight: var(--font-weight-semibold);
    line-height: 36px;
    color: var(--color-text-title1);
}

.board-table-desc {
    margin-top: 5px;
    padding-left: 27px;
    font-size: var(--font-size-body-md);
    font-weight: var(--font-weight-medium);
    line-height: 27px;
    color: var(--color-text-body);
}

.board-table-desc li {
    display: list-item;
    list-style-type: disc;
}

.board-table-note {
    margin-top: 10px;
    font-size: var(--font-size-caption);
    font-weight: var(--font-weight-regular);
    line-height: 1.6;
    color: var(--color-text-body);
}

.board-table-note-title {
    margin-top: var(--board-gap);
    font-size: var(--font-size-caption);
    font-weight: var(--font-weight-semibold);
    line-height: 24px;
    color: var(--color-primary);
}

/* 각주 그룹 — 제목(.board-table-note-title) + 각주 목록(.board-table-footnote)을 왼쪽 선 하나로 묶는다 */
.board-footnote {
    margin-top: var(--board-gap);
    padding-left: 20px;
    border-left: 2px solid color-mix(in srgb, var(--color-primary) 40%, transparent);
}

.board-footnote .board-table-note-title {
    margin-top: 0;
}

.board-footnote .board-table-footnote {
    margin-top: 6px;
}

.board-table-footnote {
    margin-top: 8px;
    font-size: var(--font-size-label-xs);
    line-height: 1.7;
    color: var(--color-text-body);
}

.board-table-footnote dt {
    margin-top: 8px;
    font-weight: var(--font-weight-medium);
}

.board-table-footnote dd {
    margin-left: 16px;
}

.board-section-head {
    margin-bottom: 15px;
}

.board-section-title {
    padding-left: 12px;
    border-left: 3px solid var(--color-primary);
    font-size: var(--font-size-body-md);
    font-weight: var(--font-weight-medium);
    line-height: 27px;
    color: var(--color-primary);
}

.board-section-title + .board-section-subtitle {
    margin-top: 6px;
}

.board-section-subtitle {
    position: relative;
    padding-left: 12px;
    font-size: var(--font-size-caption);
    font-weight: var(--font-weight-medium);
    line-height: 24px;
    color: var(--color-primary);
}

.board-section-subtitle::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    width: 3px;
    height: 14px;
    background: var(--color-primary);
}

.board-table-wrap {
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

.board-table-wrap + .board-table-wrap {
    margin-top: var(--board-gap);
}

.board-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1520 / 1178;
    background: var(--color-gray50);
    border: 1px solid var(--color-gray300);
}

.board-table {
    width: 100%;
    min-width: var(--breakpoint-tablet);
    border-collapse: collapse;
    table-layout: fixed;
}

.board-table caption {
    position: static;
    width: auto;
    height: 0;
}

/* 열 너비/정렬처럼 테이블마다 값이 달라지는 modifier(--curriculum, --rules 등)는
 * 값이 우연히 같더라도 여기 두지 않는다 — 각 페이지 전용 CSS($page_css로 자동
 * 로드되는 sub/{pg_code}.css, html과 같은 폴더)에 개별 작성. board.css는 모든
 * 테이블에 그대로 재사용되는 진짜 범용 규칙만 둔다 */
.board-table td.is-num {
    text-align: right;
}

.board-table .is-total {
    background: var(--color-gray50);
}

.board-table .is-total td {
    font-weight: var(--font-weight-semibold);
}

.board-table th,
.board-table td {
    padding: 15px;
    border: 1px solid var(--color-border-table);
    font-size: var(--font-size-caption);
    line-height: 24px;
    color: var(--color-text-title1);
    text-align: center;
    vertical-align: middle;
    word-break: keep-all;
}

.board-table td {
    font-family: 'Roboto', var(--font-base);
}

.board-table thead th {
    background: var(--color-bg-table-header);
    color: var(--color-text-table-header);
    font-weight: var(--font-weight-semibold);
    white-space: nowrap;
}

.board-table thead th.board-table-head--accent {
    background: var(--color-bg-table-header-strong);
    color: var(--color-text-inverse);
}

.board-table--accent thead th {
    background: var(--color-bg-table-header-strong);
    color: var(--color-text-inverse);
}

/* 상단 선 강조 표 — 헤더 위 2px primary 선, th 회색 블록(weight medium, 55px), 표 바깥 좌우 선 없음.
 * 2단 헤더 통계표(교수현황·장학금 수혜현황)용, 영문 교원·학생 현황(table_type1)의 실제 렌더를 토큰으로 옮긴 것 */
.board-table--topline th,
.board-table--topline thead th {
    background: var(--color-bg-table-header);
    color: var(--color-text-table-header);
    font-weight: var(--font-weight-medium);
}

.board-table--topline thead th {
    height: 55px;
}

.board-table--topline thead tr:first-child th {
    border-top: 2px solid var(--color-primary);
}

.board-table--topline th:first-child,
.board-table--topline td:first-child {
    border-left: 0;
}

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

.board-table .board-table-cell--left {
    text-align: left;
}

.board-table .board-table-tag--major-required { color: var(--color-tag-major-required); }
.board-table .board-table-tag--major-elective { color: var(--color-tag-major-elective); }
.board-table .board-table-tag--liberal-required { color: var(--color-tag-liberal-required); }
.board-table .board-table-tag--liberal-elective { color: var(--color-tag-liberal-elective); }

/* ============================================
 * 여기부터 테이블(table) 아님 — 카드/리스트형 게시판(webzine 등) 전담
 * ============================================ */

.content-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.content-list-search {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* content-set — 그리드/리스트/텍스트 3뷰 전환용 단일 데이터 컴포넌트.
 * 데이터(.content-item)는 한 벌만 두고, 부모 .content-set의 data-view 값만
 * 바꾸면(toggle-view.js) 아래 규칙들이 배치를 전부 다시 잡는다 — 3벌 복제 금지 */
.content-set[data-view="grid"] {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: start;
    gap: 65px 28px;
}

.content-set[data-view="list"],
.content-set[data-view="text"] {
    display: flex;
    flex-direction: column;
}

.content-set[data-view="grid"] .content-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
}

/* 역대학장 카드(2026-08-24 Figma 개편) — 마크업 순서(태그→썸네일→본문)는
 * 유지한 채 grid 뷰에서만 order로 시각 순서를 썸네일→태그→본문으로 재배치 */
.content-set[data-view="grid"] .content-item-thumb {
    order: 1;
}

.content-set[data-view="grid"] .content-tag {
    order: 2;
    padding: 0;
    background: none;
    color: var(--color-primary);
    font-size: var(--font-size-label-md);
}

.content-set[data-view="grid"] .content-item:nth-child(even) .content-tag {
    background: none;
}

.content-set[data-view="grid"] .content-item-body {
    order: 3;
    align-items: center;
}

.content-set[data-view="grid"] .content-item-title {
    font-size: 26px;
    font-weight: var(--font-weight-bold);
    -webkit-line-clamp: initial;
    line-clamp: initial;
}

.content-set[data-view="grid"] .content-item-meta {
    align-items: center;
    font-size: var(--font-size-body-sm);
}

/* 재임기간이 학과 줄보다 먼저 오던 마크업 순서를 grid 뷰에서만 뒤집음(디자인은 학과→재임기간) */
.content-set[data-view="grid"] .content-item-meta p:first-child { order: 2; }
.content-set[data-view="grid"] .content-item-meta p:last-child { order: 1; }

.content-set[data-view="list"] .content-item,
.content-set[data-view="text"] .content-item {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 30px 0;
    border-bottom: 1px solid var(--color-gray300);
}

.content-item-thumb {
    flex-shrink: 0;
    background: var(--color-gray200);
    overflow: hidden;
}

.content-tag {
    display: block;
    text-align: center;
    padding: 12px;
    font-size: var(--font-size-label-xs);
    font-weight: var(--font-weight-medium);
    color: var(--color-white);
    background: var(--color-primary);
}

.content-item:nth-child(even) .content-tag {
    background: var(--color-primary-hover);
}

.content-set[data-view="grid"] .content-item-thumb {
    width: 140px;
    aspect-ratio: 223 / 278;
}

.content-set[data-view="list"] .content-item-thumb {
    width: 200px;
    aspect-ratio: 1 / 1;
}

.content-set[data-view="text"] .content-item-thumb {
    display: none;
}

.content-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-item-eyebrow {
    font-size: var(--font-size-label-xs);
    color: var(--color-text-muted);
}

.content-item-body {
    flex: 1 0 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}


.content-item-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: var(--font-size-label-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-black);
}

.content-item-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: var(--font-size-caption);
    line-height: 28px;
    color: var(--color-text-body);
}

.content-item-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: var(--font-size-caption);
    color: var(--color-text-body);
}

.content-item-link {
    display: flex;
    color: inherit;
    text-decoration: none;
}

.content-item-link:hover,
.content-item-link:focus-visible {
    text-decoration: none;
}

.content-item-link:hover .content-item-title,
.content-item-link:focus-visible .content-item-title {
    color: var(--color-text-board-list-hover);
}

.content-set--board-gallery[data-view="grid"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 48px 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.content-set--board-gallery[data-view="grid"] .content-item {
    align-items: stretch;
    gap: 25px;
    width: 100%;
    text-align: left;
}

.content-set--board-gallery[data-view="grid"] .content-item-link {
    flex-direction: column;
    gap: 25px;
    width: 100%;
}

.content-set--board-gallery[data-view="list"] .content-item-link,
.content-set--board-gallery[data-view="text"] .content-item-link {
    align-items: flex-start;
    gap: 24px;
    width: 100%;
}

.content-set--board-gallery[data-view="text"] .content-item-link {
    gap: 0;
}

.content-set--board-gallery[data-view="grid"] .content-item-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 320 / 280;
    background: var(--color-bg-board-photo-thumb);
}

.content-set--board-gallery[data-view="list"] .content-item-thumb {
    flex-shrink: 0;
    width: 320px;
    aspect-ratio: 320 / 280;
    background: var(--color-bg-board-photo-thumb);
}

.content-set--board-gallery[data-view="grid"] .content-item-thumb img {
    transition: transform 0.35s ease;
}

.content-set--board-gallery[data-view="grid"] .content-item-link:hover .content-item-thumb img,
.content-set--board-gallery[data-view="grid"] .content-item-link:focus-visible .content-item-thumb img {
    transform: scale(1.04);
}

.content-set--board-gallery[data-view="grid"] .content-item-body {
    align-items: stretch;
    gap: 15px;
}

.content-set--board-gallery[data-view="grid"] .content-item-title {
    height: 60px;
    color: var(--color-text-board-list);
    font-size: 18px;
    font-weight: var(--font-weight-semibold);
    line-height: 30px;
    text-align: left;
}

.content-set--board-gallery[data-view="list"] .content-item-title,
.content-set--board-gallery[data-view="text"] .content-item-title {
    color: var(--color-text-board-list);
    text-align: left;
}

.content-set--board-gallery[data-view="grid"] .content-item-meta {
    align-items: flex-start;
    gap: 5px;
    font-size: 18px;
    line-height: 27px;
}

.content-set--board-gallery[data-view="list"] .content-item-body,
.content-set--board-gallery[data-view="text"] .content-item-body {
    align-self: stretch;
    justify-content: space-between;
    gap: 43px;                    /* 타이틀 ↔ 메타 간격 (Figma 1382-42513) */
}

.content-set--board-gallery[data-view="list"] .content-item-meta,
.content-set--board-gallery[data-view="text"] .content-item-meta {
    align-items: flex-start;
}

.content-set--board-gallery .content-item-date,
.content-set--board-gallery .content-item-hit span {
    font-family: var(--font-number);
}

.content-set--board-gallery .content-item-hit {
    display: flex;
    gap: 5px;
}

@media (max-width: 1520px) {
    .content-set[data-view="grid"] {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .content-set[data-view="grid"] {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .content-set[data-view="grid"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .content-set[data-view="grid"] {
        grid-template-columns: repeat(1, 1fr);
    }

    .content-set[data-view="list"] .content-item-thumb {
        width: 96px;
    }

    .content-set--board-gallery[data-view="grid"] .content-item-title {
        height: auto;
        min-height: 66px;
        font-size: 20px;
        line-height: 30px;
    }
}

@media (max-width: 700px) {
    .content-set--board-gallery[data-view="grid"] {
        grid-template-columns: 1fr;
        gap: 34px;
    }
}

@media (max-width: 768px) {
    .content-set--board-gallery[data-view="list"] .content-item-body,
    .content-set--board-gallery[data-view="text"] .content-item-body {
        gap: 4px;
    }
}


/* 간격 스케일 — 값 하나로 다 못 맞춰서(디자인마다 40/80/120 등 제각각) 사이즈별로 분리.
 * 기존 --board-gap은 --board-gap-sm과 동일(하위 호환, 쓰던 곳 안 건드림).
 * 반응형 축소 비율은 --board-gap(40→24→16)에서 이미 검증된 비율(×0.6, ×0.667)을 그대로 적용 */
:root {
    --board-gap-xl: 120px;
    --board-gap-lg: 80px;
    --board-gap-md: 60px;
    --board-gap-sm: 40px;
    --board-gap-xs: 24px;
    --board-gap: var(--board-gap-sm);
}

@media (max-width: 1024px) {
    :root {
        --board-gap-xl: 72px;
        --board-gap-lg: 48px;
        --board-gap-md: 36px;
        --board-gap-sm: 24px;
        --board-gap-xs: 14px;
    }
}

@media (max-width: 768px) {
    :root {
        --board-gap-xl: 48px;
        --board-gap-lg: 32px;
        --board-gap-md: 24px;
        --board-gap-sm: 16px;
        --board-gap-xs: 10px;
    }
}

/* ============================================
 * 임상실습지침서 게시판 (basic 스킨, mn=337 전용 — .clinical-practice-guide 래퍼로 스코프)
 * 연도탭 / 학년버튼 / 진료과 필터 / 게시글 표. 다른 basic 스킨 게시판엔 영향 없음.
 * ============================================ */

/* 연도탭 (2026/2025/2024학년도) */
/* 연도 탭은 사이트 공용 .tab-nav/.tab-btn 그대로 사용 — 아래 학년 버튼과의 간격만 조정 */
.clinical-practice-guide .tab-nav {
    margin-bottom: 24px;
}

/* 학년버튼 (3학년 / 4학년) */
.clinical-practice-guide .classroom01 {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    margin: 0 0 40px;
    padding: 0 136px;
    list-style: none;
}

/* 위 연도 탭이 칸을 맞붙여 쓰므로 학년 행도 같은 격자로 — 칸 사이 테두리는 한 줄로 연결
 * (마지막 칸은 셀렉트박스가 자기 테두리를 가지므로 건드리지 않는다) */
.clinical-practice-guide .classroom01 li:not(:last-child) a {
    border-right: 0;
}

.clinical-practice-guide .classroom01 li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    height: 72px;
    padding: 0 20px;
    border: 1px solid var(--color-border-base);
    background: var(--color-white);
    font-size: var(--font-size-label-lg);
    color: var(--color-black);
}

.clinical-practice-guide .classroom01 li a::after {
    content: "";
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: currentColor;
    -webkit-mask: url("/assets/icons/right.svg") center / contain no-repeat;
    mask: url("/assets/icons/right.svg") center / contain no-repeat;
}

/* 연도 탭 active는 primary 채움 — 학년 버튼은 아웃라인(테두리 primary + 옅은 배경 + primary 글씨)으로 구분
 * 화살표 아이콘은 currentColor라 글자색을 따라간다 */
.clinical-practice-guide .classroom01 li.on a {
    border-color: var(--color-primary);
    border-right: 1px solid var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 10%, transparent);
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
}

/* 칸 사이 선이 2px 로 겹치지 않도록, active 다음 칸의 왼쪽 선을 지운다 */
.clinical-practice-guide .classroom01 li.on + li a,
.clinical-practice-guide .classroom01 li.on + li .select-box {
    border-left: 0;
}

/* 진료과 필터 — 학년 버튼과 같은 칸·높이로 한 줄에 배치(.expand가 폭 100% 담당) */
.clinical-practice-guide .classroom01-filter .select-box-wrap {
    height: 72px;
}

/* 작성자·등록일은 줄임표가 뜨면 안 되는 열 — 내용 실측 폭 + 셀 좌우 패딩에 여유를 더해 고정
 * (table-layout:fixed 라 colgroup 없이 첫 행 셀 폭이 열 너비를 결정한다) */
.clinical-practice-guide #board_list thead th.t_user,
.clinical-practice-guide #board_list tbody td.t_user {
    width: 160px;
}

.clinical-practice-guide #board_list thead th.t_date,
.clinical-practice-guide #board_list tbody td.t_date {
    width: 150px;
}

.clinical-practice-guide #board_list .t_sel {
    display: none;
}

.clinical-practice-guide #board_list .category {
    color: var(--color-text-muted);
}

@media (max-width: 1024px) {
    .clinical-practice-guide .classroom01 {
        padding: 0;
    }
}

@media (max-width: 768px) {
    .clinical-practice-guide .classroom01 {
        grid-auto-flow: row;
        grid-template-columns: minmax(0, 1fr);
        margin-bottom: 28px;
    }

    .clinical-practice-guide .classroom01 li:not(:last-child) a {
        border-right: 1px solid var(--color-border-base);
        border-bottom: 0;
    }

    .clinical-practice-guide .classroom01 li.on a {
        border-bottom: 1px solid var(--color-primary);
    }

    .clinical-practice-guide .classroom01 li.on + li a,
    .clinical-practice-guide .classroom01 li.on + li .select-box {
        border-left: 1px solid var(--color-border-base);
        border-top: 0;
    }
}
