/* 익산원광요양원 아카이브 - 커스텀 스타일 */

/* ══════════════════════════════════════
   CSS 변수 & 기본 설정
══════════════════════════════════════ */
:root {
    --arc-primary:     #0d6efd;
    --arc-primary-lt:  #e7f1ff;
    --arc-text:        #212529;
    --arc-text-muted:  #6c757d;
    --arc-border:      #dee2e6;
    --arc-bg-light:    #f8f9fa;
    --arc-card-shadow: 0 1px 6px rgba(0,0,0,.08);
    --arc-radius:      .5rem;
    --arc-transition:  .18s ease;
}

body {
    font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont,
                 'Segoe UI', sans-serif;
    color: var(--arc-text);
    background-color: #f5f7fa;
    line-height: 1.65;
}

/* ══════════════════════════════════════
   네비게이션
══════════════════════════════════════ */
.navbar {
    padding-top: .6rem;
    padding-bottom: .6rem;
}
.navbar-brand {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -.3px;
}
.navbar-nav .nav-link {
    font-size: .92rem;
    padding-left: .75rem;
    padding-right: .75rem;
    color: #fff !important;
    transition: color var(--arc-transition), background-color var(--arc-transition);
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: #ffc107 !important;
    background-color: rgba(255,255,255,.08);
    border-radius: .35rem;
}
.navbar-dark .navbar-nav .nav-link.active {
    font-weight: 600;
    color: #fff !important;
    background-color: rgba(255,255,255,.12);
    border-radius: .35rem;
}
.navbar-dark .navbar-nav .nav-link.active:hover {
    color: #ffc107 !important;
}
/* 드롭다운 토글 화살표 색 일치 */
.navbar-nav .dropdown-toggle::after {
    border-top-color: inherit;
}
.navbar-brand {
    transition: color var(--arc-transition);
}
.navbar-brand:hover {
    color: #ffc107 !important;
}
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    border-radius: var(--arc-radius);
    padding: .35rem;
    min-width: 13rem;
}
.dropdown-item {
    border-radius: .3rem;
    font-size: .9rem;
    padding: .45rem .75rem;
    transition: background-color var(--arc-transition), color var(--arc-transition);
}
.dropdown-item:hover {
    background-color: #fff8e1;
    color: #b8860b;
}

/* ══════════════════════════════════════
   메인 컨테이너
══════════════════════════════════════ */
main.container {
    padding-top: 1.75rem;
    padding-bottom: 3rem;
}

/* ══════════════════════════════════════
   페이지 타이틀 영역
══════════════════════════════════════ */
.page-title {
    border-left: 4px solid var(--arc-primary);
    padding-left: .75rem;
    margin-bottom: 1.5rem;
}
.page-title h4 {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: .1rem;
}
.page-title small {
    font-size: .82rem;
}

/* ══════════════════════════════════════
   카드
══════════════════════════════════════ */
.card {
    border-radius: var(--arc-radius);
}
.card.shadow-sm {
    box-shadow: var(--arc-card-shadow) !important;
}
.card-header.bg-white {
    background-color: #fff !important;
    border-bottom: 1px solid var(--arc-border) !important;
    font-size: .95rem;
    font-weight: 600;
    padding: .85rem 1.25rem .75rem;
}
.card-header.border-0 {
    border-bottom: none !important;
}

/* 카드 호버 효과 */
.hover-shadow {
    transition: box-shadow var(--arc-transition), transform var(--arc-transition);
}
.hover-shadow:hover {
    box-shadow: 0 .4rem 1.2rem rgba(0,0,0,.13) !important;
    transform: translateY(-2px);
}

/* 통계 카드 */
.stat-card {
    border-radius: var(--arc-radius);
    border: none;
    background: #fff;
    text-align: center;
    padding: 1rem .5rem;
    box-shadow: var(--arc-card-shadow);
    transition: box-shadow var(--arc-transition);
}
.stat-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.11); }
.stat-card .stat-num {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1;
}
.stat-card .stat-label {
    font-size: .8rem;
    color: var(--arc-text-muted);
    margin-top: .25rem;
}

/* ══════════════════════════════════════
   테이블
══════════════════════════════════════ */
.table {
    font-size: .9rem;
}
.table th {
    background-color: #f4f6f9;
    font-weight: 600;
    white-space: nowrap;
    font-size: .84rem;
    color: #495057;
    border-top: none;
    padding: .65rem .75rem;
}
.table td {
    vertical-align: middle;
    padding: .6rem .75rem;
    color: var(--arc-text);
}
.table-hover tbody tr:hover {
    background-color: #f0f5ff;
    cursor: pointer;
}
.table-sm th,
.table-sm td {
    padding: .5rem .75rem;
}

/* ══════════════════════════════════════
   배지
══════════════════════════════════════ */
.badge {
    font-weight: 500;
    font-size: .75rem;
    padding: .3em .6em;
    border-radius: .3rem;
}

/* 보존기간 만료 배지 */
.badge-expired   { background-color: #dc3545; }
.badge-expiring  { background-color: #fd7e14; }
.badge-preserved { background-color: #198754; }

/* ══════════════════════════════════════
   버튼
══════════════════════════════════════ */
.btn {
    font-size: .88rem;
    border-radius: .4rem;
    font-weight: 500;
    transition: all var(--arc-transition);
}
.btn-sm { font-size: .82rem; }
.btn-primary {
    box-shadow: 0 2px 6px rgba(13,110,253,.25);
}
.btn-primary:hover {
    box-shadow: 0 4px 10px rgba(13,110,253,.35);
}

/* ══════════════════════════════════════
   폼 요소
══════════════════════════════════════ */
.form-control,
.form-select {
    font-size: .9rem;
    border-radius: .4rem;
    border-color: #ced4da;
    transition: border-color var(--arc-transition), box-shadow var(--arc-transition);
}
.form-control:focus,
.form-select:focus {
    border-color: var(--arc-primary);
    box-shadow: 0 0 0 .2rem rgba(13,110,253,.15);
}
.form-label {
    font-size: .875rem;
    font-weight: 500;
    color: #495057;
    margin-bottom: .3rem;
}
.form-control-sm,
.form-select-sm {
    font-size: .84rem;
}

/* 검색 폼 */
.search-bar .form-control {
    border-right: 0;
}
.search-bar .btn {
    border-left: 0;
}

/* 필터 카드 */
.filter-card .card-body {
    padding: .75rem 1rem;
}

/* ══════════════════════════════════════
   알림 메시지 (alert)
══════════════════════════════════════ */
.alert {
    border-radius: var(--arc-radius);
    font-size: .9rem;
    border: none;
    padding: .85rem 1.1rem;
}
.alert-success  { background-color: #d1f0e1; color: #0a5e30; }
.alert-danger   { background-color: #ffe0e3; color: #8b1a2a; }
.alert-warning  { background-color: #fff3cd; color: #7d5a00; }
.alert-info     { background-color: #d4efff; color: #0c4a6e; }
.alert-light    { background-color: #f8f9fa; color: #495057; border: 1px solid var(--arc-border) !important; }

/* ══════════════════════════════════════
   빵 부스러기 (breadcrumb)
══════════════════════════════════════ */
.breadcrumb {
    background: transparent;
    padding: 0;
    font-size: .83rem;
    margin-bottom: 1rem;
}
.breadcrumb-item a {
    color: var(--arc-primary);
    text-decoration: none;
}
.breadcrumb-item a:hover { text-decoration: underline; }

/* ══════════════════════════════════════
   목록 행 클릭 가능 영역
══════════════════════════════════════ */
tr.clickable-row { cursor: pointer; }

/* ══════════════════════════════════════
   공지 목록 아이템
══════════════════════════════════════ */
.notice-row {
    padding: .7rem 1rem;
    border-bottom: 1px solid var(--arc-border);
    transition: background-color var(--arc-transition);
}
.notice-row:last-child { border-bottom: none; }
.notice-row:hover { background-color: #f0f5ff; }
.notice-row .notice-title {
    font-weight: 600;
    font-size: .95rem;
    color: var(--arc-text);
    text-decoration: none;
}
.notice-row .notice-title:hover { color: var(--arc-primary); }
.notice-row.pinned {
    background-color: #fffdf0;
    border-left: 3px solid #ffc107;
}

/* ══════════════════════════════════════
   업무 링크 카드
══════════════════════════════════════ */
.link-card {
    transition: all var(--arc-transition);
    border-radius: var(--arc-radius);
}
.link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(0,0,0,.12) !important;
}
.link-icon-box {
    width: 44px;
    height: 44px;
    border-radius: .4rem;
    background-color: var(--arc-primary-lt);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.link-icon-box i { color: var(--arc-primary); font-size: 1.1rem; }

/* ══════════════════════════════════════
   히어로 배너
══════════════════════════════════════ */
.arc-hero {
    border-radius: var(--arc-radius);
    padding: 2rem 1.75rem;
    margin-bottom: 1.5rem;
}

/* ══════════════════════════════════════
   진행 바 (통계)
══════════════════════════════════════ */
.progress {
    border-radius: 10px;
    background-color: #e9ecef;
}
.progress-bar {
    border-radius: 10px;
    transition: width .5s ease;
}

/* ══════════════════════════════════════
   코드/아카이브 코드
══════════════════════════════════════ */
code {
    font-size: .82rem;
    color: #6f42c1;
    background-color: #f3f0ff;
    padding: .1em .4em;
    border-radius: .25rem;
}

/* ══════════════════════════════════════
   기록물 상세 - 메타 정보 셀
══════════════════════════════════════ */
.meta-cell {
    background-color: var(--arc-bg-light);
    border-radius: .4rem;
    padding: .65rem .75rem;
    text-align: center;
}
.meta-cell .meta-label {
    font-size: .78rem;
    color: var(--arc-text-muted);
    display: block;
    margin-bottom: .15rem;
}
.meta-cell .meta-value {
    font-weight: 600;
    font-size: .92rem;
}

/* ══════════════════════════════════════
   공지 내용 본문
══════════════════════════════════════ */
.notice-content {
    font-size: .95rem;
    line-height: 1.9;
    color: var(--arc-text);
    white-space: pre-wrap;
    word-break: break-word;
}

/* list-group 공지 목록 */
.list-group-item-action {
    color: var(--arc-text);
    font-size: .9rem;
}
.list-group-item-action:hover {
    background-color: #f0f5ff;
    color: var(--arc-text);
}
.list-group-item-action.border-start.border-warning {
    background-color: #fffdf0 !important;
}

/* ══════════════════════════════════════
   푸터
══════════════════════════════════════ */
footer {
    margin-top: 3rem;
    border-top: 1px solid rgba(255,255,255,.08);
}
footer a:hover { color: #ccc !important; }

/* ══════════════════════════════════════
   사이드바 (미래 확장용)
══════════════════════════════════════ */
@media (min-width: 992px) {
    .sidebar { position: sticky; top: 80px; }
}

/* ══════════════════════════════════════
   반응형
══════════════════════════════════════ */
@media (max-width: 767px) {
    main.container { padding-top: 1.25rem; }
    .arc-hero { padding: 1.4rem 1.25rem; }
    .stat-card .stat-num { font-size: 1.5rem; }
    .table th, .table td { font-size: .82rem; }
}
@media (max-width: 576px) {
    .container { padding-left: 1rem; padding-right: 1rem; }
    .page-title h4 { font-size: 1.05rem; }
    .btn { font-size: .84rem; }
}
