/* 목록 테이블 열 너비 */
.tbl-basic colgroup col:nth-child(1) { width: 8%; }
.tbl-basic colgroup col:nth-child(3) { width: 15%; }
.tbl-basic colgroup col:nth-child(4) { width: 10%; }

/* ==================== NOTICE WRAP ==================== */
.notice-wrap {}

.notice-wrap .page-title {
	text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 3rem;
}

/* ==================== 검색 영역 ==================== */
.notice-search {
    display: flex;
    align-items: center;
    text-align: right;
    max-width: 50%;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    border-radius: 6px;
}

.notice-search input[type=text] {
    padding: .5rem .8rem;
    border: 1px solid var(--base-offwhite);
    border-radius: 4px;
    font-size: 1rem;
    flex: 1;
    min-width: 12rem;
}

/* 검색 버튼 → 전역 .btn.btn--primary 사용 */

/* ==================== 테이블 ==================== */
.tbl-wrap {
    overflow-x: auto;
    margin-bottom: 8px;
}

.tbl-basic {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
    border-top: 2px solid var(--fmcmain, #0085C9);
}

.tbl-basic caption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.tbl-basic thead th {
    padding: .8rem .6rem;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--base-dimgray);
    background: var(--base-aliceblue);
    border-bottom: 1px solid var(--base-offwhite);
}

.tbl-basic tbody tr {
    border-bottom: 1px solid var(--base-offwhite);
    transition: background .12s;
}

.tbl-basic tbody tr:hover {
    background: var(--base-aliceblue);
}

.tbl-basic tbody td {
    padding: .6rem;
    text-align: center;
    color: var(--base-dimgray);
    font-size: 1rem;
}

.tbl-basic tbody td.title {
    text-align: left;
}

.tbl-basic tbody td.title a {
    color: var(--base-black);
    text-decoration: none;
}

.tbl-basic tbody td.title a:hover {
    color: var(--fmcmain, #0085C9);
    text-decoration: underline;
}

/* 공지 고정 행 */
.tbl-basic tr.notice-fixed {
    background: var(--base-butterywhite);
}

.tbl-basic tr.notice-fixed:hover {
    background: var(--base-barleywhite);
}

.badge.notice {
    display: inline-block;
    padding: .1rem .4rem;
    background: var(--fmcmain, #0085C9);
    color: var(--base-white);
    font-size: .8rem;
    font-weight: 700;
    border-radius: 3px;
    vertical-align: middle;
}

/* 데이터 없음 */
.no-data {
    padding: 3rem 1.3rem;
    text-align: center;
    color: var(--base-darkgray);
    font-size: 1.2rem;
}

/* ==================== 페이징 ==================== */
.paging {
    display: flex;
    justify-content: center;
    gap: .2rem;
    margin-top: 1.5rem;
    list-style: none;
    padding: 0;
}

.paging li a {
    display: block;
    padding: .4rem .8rem;
    border: 1px solid var(--base-slate-light);
    border-radius: 4px;
    font-size: 13px;
    color: var(--base-cloudburst);
    text-decoration: none;
    transition: all .15s;
}

.paging li a:hover,
.paging li a.on {
    background: var(--fmcmain, #0085C9);
    border-color: var(--fmcmain, #0085C9);
    color: var(--base-white);
}

/* ==================== NOTICE DETAIL ==================== */
.board-view {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
    border-top: 2px solid var(--fmcmain, #0085C9);
    margin-bottom: 1rem;
}

.board-view tr {
    border-bottom: 1px solid var(--base-offwhite);
}

.board-view th {
    width: 7.5rem;
    padding: .7rem 1rem;
    background: var(--base-aliceblue);
    font-weight: 700;
    text-align: center;
    color: var(--base-dimgray);
    vertical-align: middle;
    border-right: 1px solid var(--base-offwhite);
}

.board-view td {
    padding: .6rem 1rem;
    color: var(--base-gray);
}

.board-view td.board-cont {
    min-height: 12.5rem;
    line-height: 1.7;
}

/* 첨부파일 영역 */
.attach-area {
    margin-bottom: 1rem;
    border: 1px solid var(--base-offwhite);
    border-radius: 6px;
    overflow: hidden;
}

.attach-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1rem;
    background: var(--base-aliceblue);
    border-bottom: 1px solid var(--base-offwhite);
}

.attach-label {
    font-weight: 700;
    font-size: .8rem;
    color: var(--base-dimgray);
}

.attach-count {
    font-size: .7rem;
    color: var(--base-cloudburst);
}

.attach-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.attach-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem 1rem;
    border-bottom: 1px solid var(--base-offwhite);
    transition: background .1s;
}

.attach-item:last-child {
    border-bottom: none;
}

.attach-item:hover {
    background: var(--base-aliceblue);
}

/* 확장자 배지 */
.attach-ext {
    display: inline-block;
    min-width: 2.5rem;
    padding: .1rem .5rem;
    border-radius: 3px;
    font-size: .6rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    background: var(--base-dimgray);
    color: var(--base-white);
    flex-shrink: 0;
}

.attach-ext-pdf              { background: var(--base-darkred); }
.attach-ext-hwp              { background: var(--base-cobalt); }
.attach-ext-doc,
.attach-ext-docx             { background: var(--base-cobalt-dark); }
.attach-ext-xls,
.attach-ext-xlsx             { background: var(--base-deepgreen); }
.attach-ext-ppt,
.attach-ext-pptx             { background: var(--base-orange-dark); }
.attach-ext-zip,
.attach-ext-rar,
.attach-ext-7z               { background: var(--base-violet); }
.attach-ext-jpg,
.attach-ext-jpeg,
.attach-ext-png,
.attach-ext-gif              { background: var(--base-teal); }

/* 파일 다운로드 링크 */
.attach-link {
    flex: 1;
    font-size: .8rem;
    color: var(--base-gray);
    text-decoration: none;
    word-break: break-all;
}

.attach-link:hover {
    color: var(--fmcmain, #0085C9);
    text-decoration: underline;
}

/* 다운로드 횟수 */
.attach-dl-cnt {
    font-size: .6rem;
    color: var(--base-darkgray);
    flex-shrink: 0;
}

/* 로딩 / 빈 목록 / 에러 */
.attach-loading,
.attach-empty,
.attach-error {
    padding: .8rem 1rem;
    font-size: 1rem;
    color: var(--base-darkgray);
    list-style: none;
}

.attach-error {
    color: var(--base-glossyred);
}

/* 하단 버튼 영역 */
.btn-area {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-top: 1rem;
}

/* 목록 버튼 → 전역 .btn.btn--gray 사용 */

.board-count {
    margin: .5rem 0 1.2rem;
    font-size: 14px;
    color: var(--base-dimgray);
}

.board-count strong {
    color: var(--fmcmain, #0085C9);
}

.gallery-wrap .notice-search {
    justify-content: flex-end;
    background: var(--base-white);
    border: 0;
    border-radius: 0;
    padding: 0 0 1.2rem;
}

.gallery-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.8rem 1.3rem;
    margin: 0;
    padding-top: 1rem;
    border-top: 2px solid var(--base-dimgray);
}

.gallery-item a {
    display: block;
    color: var(--base-cloudburst);
    text-decoration: none;
}

.gallery-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 2.6;
    overflow: hidden;
    border: 1px solid var(--base-offwhite);
    border-bottom: 2px solid var(--fmcmain);
    background: var(--base-lightgray);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .18s ease;
}

.gallery-item a:hover .gallery-thumb img {
    transform: scale(1.04);
}

.gallery-title {
    display: block;
    margin-top: .6rem;
    text-align: center;
    font-size: 1rem;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-item a:hover .gallery-title {
    color: var(--fmcmain, #0085C9);
    text-decoration: underline;
}

.gallery-no-image {
    font-size: .7rem;
    font-weight: 700;
    color: var(--base-darkgray);
    letter-spacing: .04em;
}

.gallery-empty {
    padding: 3.5rem 1.4rem;
    text-align: center;
    border-top: 2px solid var(--base-darkgray);
    border-bottom: 1px solid var(--base-offwhite);
    color: var(--base-darkgray);
}

.gallery-detail-image {
    max-width: 760px;
}

.gallery-detail-image img {
    max-width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--base-offwhite);
}

@media (max-width: 900px) {
    .gallery-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .gallery-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.3rem .8rem;
    }

    .gallery-wrap .notice-search {
        justify-content: stretch;
    }
    
    .notice-search {
    	max-width: 100%;
    }
}
