/*
 * 공개 목록 페이지 — 공지사항·자료실 (미인증/인증 공용)
 * Layout=null Landing chrome / _LayoutTop in-app 양쪽에서 같은 콘텐츠 partial 이 사용.
 */

body { font-family:'Pretendard','Noto Sans KR',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; color:#1f2937; margin:0; }

/* In-app(사이드바 레이아웃) 에서는 Bootstrap .container 의 max-width 가 콘텐츠 영역
   안에서 가운데 정렬되어 좁아 보임 → 전체 너비 사용. Landing(standalone) 은 영향 없음. */
.public-inapp .container { max-width: 100%; width: 100%; padding-left: 0; padding-right: 0; }
/* In-app 게시판 목록 — 행 높이 컴팩트 */
.public-inapp .notice-table th,
.public-inapp .library-table th { padding: 0.55rem 1rem; font-size: 0.95rem; }
.public-inapp .notice-table td,
.public-inapp .library-table td { padding: 0.5rem 1rem; font-size: 0.95rem; }
.public-inapp .notice-table tbody tr,
.public-inapp .library-table tbody tr { border-bottom: 1px solid #f1f5f9; }

/* ====================== 공개 서브 페이지 공통 배너 ====================== */
.public-banner {
    position: relative;
    height: 180px;
    background: url('/images/banner/mouse-8434662.jpg') center 66% / cover no-repeat;
    overflow: hidden;
}
.public-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30,58,138,0.78) 0%, rgba(59,130,246,0.55) 100%);
}
.public-banner-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
}
.public-banner h2 {
    font-weight: 800;
    font-size: 2rem;
    margin: 0;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.public-banner p {
    font-size: 1rem;
    opacity: 0.95;
    margin: 0.5rem 0 0;
    text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}
@media (max-width: 768px) {
    .public-banner { height: 130px; }
    .public-banner h2 { font-size: 1.4rem; }
    .public-banner p { font-size: 0.85rem; }
}
/* 배너 ↔ 게시판 사이 여백 + 목록 하단 여백 (Landing 공개 페이지) */
.landing-page .public-banner { margin-bottom: 2.25rem; }
.landing-page .container.mt-4 { margin-top: 0 !important; margin-bottom: 2.5rem; }

/* ====================== About 페이지 ====================== */
.about-content { padding-top: 2.5rem; padding-bottom: 3rem; }
.about-section { margin-bottom: 2.5rem; }
.about-section h3 { color: #1e3a8a; font-weight: 700; margin-bottom: 0.75rem; }
.about-section h4 { color: #1f2937; font-weight: 700; margin: 1rem 0 0.75rem; }
.about-section .lead { color: #4b5563; font-size: 1.05rem; line-height: 1.7; }
.about-section h6 { font-size: 1.05rem; font-weight: 700; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.about-section p { line-height: 1.7; margin-bottom: 1rem; }
.about-section ul, .about-section ol { line-height: 1.7; margin-bottom: 1rem; }

/* 법령 콘텐츠 (이용약관·개인정보처리방침) — 흰 바탕 위 카드형 박스 */
.about-section.legal-content {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
    padding: 2rem 2.5rem;
}
.about-section.legal-content h6:first-child { margin-top: 0; }
@media (max-width: 576px) {
    .about-section.legal-content { padding: 1.25rem 1rem; }
}

/* About feature 카드 */
.about-feature {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    height: 100%;
    transition: all 0.2s;
}
.about-feature:hover { border-color: #3b82f6; box-shadow: 0 4px 12px rgba(30,58,138,0.08); }
.about-feature > i {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: #dbeafe;
    color: #1e3a8a;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}
.about-feature h5 { font-weight: 700; color: #1f2937; font-size: 1rem; margin-bottom: 0.5rem; }
.about-feature p { font-size: 0.875rem; color: #6b7280; margin: 0; line-height: 1.6; }

/* About 주요 기능 그리드 — col 자체에 명시적 bottom margin (Bootstrap gy 동작 비의존) */
.about-features-grid > [class*="col-"] { margin-bottom: 1.5rem; }

/* About list */
.about-list { padding-left: 1.25rem; }
.about-list li { padding: 0.35rem 0; color: #4b5563; }
.about-list li strong { color: #1e3a8a; }

/* CTA section */
.about-cta-section {
    background: #f9fafb;
    border-radius: 0.5rem;
    padding: 2.5rem 1.5rem;
    border: 1px solid #e5e7eb;
}
.about-cta-section h4 { color: #1e3a8a; }

/* Contact detail cards */
.contact-detail-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    height: 100%;
    text-align: center;
}
.contact-detail-icon {
    font-size: 1.75rem;
    color: #1e3a8a;
    margin-bottom: 0.75rem;
}
.contact-detail-card h5 { font-weight: 700; color: #1f2937; font-size: 1rem; margin-bottom: 0.5rem; }
.contact-detail-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e3a8a;
    text-decoration: none;
    margin-bottom: 0.5rem;
}
.contact-detail-value:hover { color: #1e40af; }
.contact-detail-card a { color: #3b82f6; text-decoration: none; }
.contact-detail-card a:hover { text-decoration: underline; }

.public-page-title { padding: 2rem 0 1rem; }
.public-page-title h2 { color: #1e3a8a; font-weight: 800; margin: 0; }
.public-page-title p { color: #6b7280; margin: 0.25rem 0 0; }

/* ── 기관 공식 게시판 스타일 (플랫 + 모던 디테일) ── */
.notice-table,
.library-table {
    width: 100%;
    background: #fff;
    border-top: 2px solid #334155;      /* 상단 강조 라인 (살짝 완화) */
    border-bottom: 1px solid #d1d5db;    /* 하단은 옅게 */
    margin-bottom: 1rem;
}
.notice-table thead th,
.library-table thead th {
    background: #fafbfc;
    color: #374151;
    font-weight: 600;
    text-align: center;
    border-bottom: 1.5px solid #cbd5e1;
    padding: 0.6rem 1rem;
    white-space: nowrap;
}
/* 제목 헤더·셀만 좌측 정렬 */
.notice-table thead th.th-title,
.library-table thead th.th-title { text-align: left; }
.notice-table tbody td,
.library-table tbody td {
    vertical-align: middle;
    text-align: center;
    border-bottom: 1px solid #eef2f7;
    padding: 0.55rem 1rem;
    color: #4b5563;
}
.notice-table tbody td.td-title,
.library-table tbody td.td-title { text-align: left; }
.notice-table tbody tr:hover,
.library-table tbody tr:hover { background: #f8fafc; }
/* 고정(상단) 공지 — 옅은 강조 배경 + 굵게 */
.notice-table tbody tr.pinned { background: #eff6ff; }
.notice-table tbody tr.pinned:hover { background: #e3effe; }
.notice-table tbody tr.pinned td { font-weight: 600; }

.notice-megaphone { color: #2563eb; font-size: 0.95em; }
.att-icon { color: #64748b; }
.pin-icon { color: #1e3a8a; opacity: 0.7; font-size: 0.85em; }
.notice-link,
.file-title { color: #1f2937; text-decoration: none; font-weight: 500; }
.notice-link:hover,
.file-title:hover { color: #1e3a8a; }

/* 페이지네이션 — 활성 페이지 숫자 가시성 보정 (흰 글자 on 네이비) */
.board-pager .pagination .page-link { color: #1f2937; }
.board-pager .pagination .page-link:hover { color: #1e3a8a; }
.board-pager .pagination .page-item.active .page-link {
    background-color: #1e3a8a;
    border-color: #1e3a8a;
    color: #fff;
}
.board-pager .pagination .page-item.disabled .page-link { color: #cbd5e1; }

.empty-state { text-align: center; padding: 4rem 1rem; color: #9ca3af; }
.empty-state i { font-size: 3rem; margin-bottom: 1rem; }

details summary { cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details[open] summary .fa-chevron-down { transform: rotate(180deg); }

.notice-body {
    background: #f9fafb;
    padding: 1rem 1.25rem;
    border-left: 3px solid #3b82f6;
    margin-top: 0.5rem;
    border-radius: 0.25rem;
}

/* ====================== 페이지네이션 + 검색 ====================== */
.board-pager .pagination .page-item.active .page-link {
    background-color: #1e3a8a; border-color: #1e3a8a;
}
.board-pager .pagination .page-link {
    color: #1e3a8a;
}
.board-pager .pagination .page-link:hover {
    color: #1e40af; background-color: #eff6ff;
}
.board-pager .pagination .page-item.disabled .page-link {
    color: #9ca3af;
}
.board-search { padding: 1rem; background: #f9fafb; border-radius: 0.5rem; }

/* ====================== 리스트 행 제목 링크 ====================== */
.notice-link { color: #1f2937; text-decoration: none; }
.notice-link:hover { color: #1e3a8a; }

/* ====================== 상세 페이지 ====================== */
.public-detail { padding-top: 1.5rem; padding-bottom: 3rem; }

.public-detail .detail-actions {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    padding: 0.75rem 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
}
.public-detail .detail-actions:last-child {
    margin-top: 2rem; margin-bottom: 0;
}

.public-detail .detail-header {
    padding: 1rem 0 1.5rem;
    border-bottom: 2px solid #1e3a8a;
    margin-bottom: 2rem;
}
.public-detail .detail-title {
    color: #1f2937; font-weight: 700; margin: 0.5rem 0; font-size: 1.5rem;
}
.public-detail .detail-meta {
    color: #6b7280; font-size: 0.875rem;
}

.public-detail .detail-body {
    background: #fff; padding: 2rem 2.25rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    min-height: 200px;
    line-height: 1.8;
}
.public-detail .detail-body img { max-width: 100%; height: auto; }
.public-detail .detail-body p:last-child { margin-bottom: 0; }

/* 자료실 상세 — 파일 카드 */
.library-desc {
    background: #f9fafb; padding: 1rem 1.25rem;
    border-left: 3px solid #3b82f6;
    border-radius: 0.25rem;
    color: #4b5563;
}
.library-content {
    margin: 1.5rem 0;
    line-height: 1.8;
    color: #1f2937;
}
.library-content img { max-width: 100%; height: auto; }
.library-content table { width: 100%; margin: 1rem 0; }
.library-content p:last-child { margin-bottom: 0; }

.library-file-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.25rem 1.5rem;
    margin-top: 1.5rem;
}
.library-file-icon { font-size: 2.5rem; margin-right: 1rem; }
.library-file-name { font-weight: 600; color: #1f2937; }
.library-file-meta { font-size: 0.85rem; color: #6b7280; margin-top: 0.25rem; }

/* 첨부 확장자 배지 — FA 글리프 대체. 어떤 폰트 환경에서도 명확. */
.file-ext-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    height: 56px;
    padding: 0 .5rem;
    margin-right: 1rem;
    border-radius: 6px;
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: .03em;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

/* Landing chrome 사용 시 (미인증) footer */
.landing-page .footer {
    background: #1f2937;
    color: #d1d5db;
    padding: 2rem 0 1.5rem;
    margin-top: 3rem;
}
.landing-page .footer .copyright { font-size: 0.8rem; color: #9ca3af; }
