@charset "UTF-8";
/* Spanish Church School 통합 자료실 스타일 (2026 리뉴얼)
   현대카드 M몰 톤 + 선교회 포인트 블루 #005599 */

/* ── 선교회 포인트 블루 하이-콘트라스트 팔레트 (www.jbch.org primary) ── */
:root {
    --point:      #005599;   /* 선교회 포인트 블루 */
    --point-dark: #003d6e;
    --point-sky:  #22B2E9;   /* 선교회 세컨더리 스카이블루 */
    --point-soft: #005599;   /* 텍스트/보더용 블루 (야간엔 밝게) */
    --ink:     #111111;
    --gray-1:  #f5f5f5;
    --gray-2:  #e8e8e8;
    --gray-3:  #999999;
    --gray-4:  #555555;
    --white:   #ffffff;
    --card:    #ffffff;      /* 카드·입력 등 표면 */
    --page-bg: #ffffff;
    --tile:    18px;   /* 타일 라운드 */
    --pill:    999px;
}

/* ── 야간 모드 (html[data-theme=dark], 토글 저장: localStorage sp_theme) ── */
html[data-theme="dark"] {
    --point-soft: #4da3e0;
    --ink:     #e6e8eb;
    --gray-1:  #22262c;
    --gray-2:  #373d45;
    --gray-3:  #8b929a;
    --gray-4:  #c8cdd3;
    --card:    #1d2126;
    --page-bg: #131518;
}
* { box-sizing: border-box; }
body {
    margin: 0; background: var(--page-bg); color: var(--ink);
    font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    font-size: 15px; line-height: 1.6;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration: none; }
.en { font-family: "Poppins", "Noto Sans KR", sans-serif; }

/* ── 상단 바: 보더 박스 워드마크 ── */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 28px; background: var(--point);
}
.topbar .logo-img { display: block; height: 28px; width: auto; }
.topbar .logo {
    display: inline-block; padding: 5px 13px;
    border: 1.5px solid var(--white); color: var(--white);
    font-family: "Poppins", sans-serif; font-size: 12px; font-weight: 600;
    letter-spacing: .06em;
}
.topbar .user { color: rgba(255,255,255,.55); font-size: 12px; letter-spacing: .04em; }

/* 상단 우측 컨트롤: 언어 스위치 + 야간 토글 */
.top-controls { display: inline-flex; align-items: center; gap: 14px; }
.lang-switch {
    display: inline-flex; border: 1px solid rgba(255,255,255,.4);
    border-radius: var(--pill); overflow: hidden;
}
.lang-switch a {
    padding: 4px 12px; font-size: 11.5px; font-weight: 600;
    color: rgba(255,255,255,.65); letter-spacing: .05em;
}
.lang-switch a.on { background: var(--white); color: var(--point); }
.theme-btn {
    width: 30px; height: 30px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,.4); background: transparent;
    color: rgba(255,255,255,.85);
    cursor: pointer; line-height: 1; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    transition: color .12s ease, border-color .12s ease;
}
.theme-btn:hover { color: #fff; border-color: #fff; }
.theme-btn svg { width: 16px; height: 16px; display: block; }
.theme-btn .ico-sun { display: none; }
html[data-theme="dark"] .theme-btn .ico-moon { display: none; }
html[data-theme="dark"] .theme-btn .ico-sun { display: block; }

/* ── 히어로: 포인트 블루, 초대형 워드마크 ── */
.hero {
    background: linear-gradient(165deg, #0063b0 0%, var(--point) 55%, var(--point-dark) 100%);
    color: var(--white);
    text-align: center; padding: 58px 20px 64px;
}
.hero .catch {
    max-width: 860px; margin: 0 auto 14px;
    font-size: 15px; font-weight: 400; line-height: 1.7;
    color: rgba(255,255,255,.75); letter-spacing: .02em;
}
.hero .catch .ref { color: rgba(255,255,255,.5); font-size: 13px; margin-left: 4px; }
.hero h1 {
    margin: 0; font-family: "Poppins", "Noto Sans KR", sans-serif;
    font-weight: 800; font-size: clamp(28px, 5vw, 56px);
    line-height: 1.1; letter-spacing: -0.015em; text-transform: uppercase;
}
.hero h1 .dot { margin: 0 .06em; }
.hero .hero-sub {
    margin: 10px 0 0; font-size: 16px; font-weight: 500;
    color: rgba(255,255,255,.85); letter-spacing: .06em;
}

/* ── 부서 탭: 필 칩 (스크롤 시 상단 고정) ── */
.tab-strip {
    background: var(--point-dark); padding: 20px 20px 26px;
    position: sticky; top: 0; z-index: 100;
}
.tabs {
    display: flex; gap: 10px; max-width: 1280px; margin: 0 auto;
    justify-content: center; flex-wrap: wrap;
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
    flex: 0 0 auto; padding: 9px 22px; border-radius: var(--pill);
    border: 1px solid rgba(255,255,255,.35); color: rgba(255,255,255,.85);
    font-size: 14px; font-weight: 500; white-space: nowrap;
    transition: all .15s ease;
}
.tabs a:hover { border-color: var(--white); color: var(--white); }
.tabs a.on { background: var(--white); border-color: var(--white); color: var(--point); font-weight: 700; }

/* ── 본문 ── */
.wrap { max-width: 1280px; margin: 0 auto; padding: 52px 24px 90px; }

.page-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; margin: 0 0 26px; }
.page-title h2 {
    margin: 0; font-size: 30px; font-weight: 900; letter-spacing: -0.02em;
}
.page-title .count {
    font-family: "Poppins", sans-serif; font-size: 13px; font-weight: 600;
    color: var(--gray-3); letter-spacing: .05em;
}

/* 공지: 접힌 한 줄 → 클릭하면 펼침 (PC·모바일 공통) */
.notice-toggle {
    display: flex; align-items: center; gap: 10px; width: 100%;
    background: var(--gray-1); border: 0; border-radius: 12px;
    padding: 12px 18px; margin: 0 0 12px;
    font-size: 14px; font-weight: 500; color: var(--gray-4);
    font-family: inherit; cursor: pointer; text-align: left;
}
.notice-toggle .ni {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border-radius: 50%; flex: 0 0 auto;
    background: var(--point); color: #fff; font-size: 11px; font-weight: 800;
    font-family: "Poppins", sans-serif;
}
.notice-toggle b { color: var(--point-soft); font-weight: 700; }
.notice-toggle .chev { width: 16px; height: 16px; margin-left: auto; transition: transform .15s ease; }
.notice-toggle.open .chev { transform: rotate(180deg); }
.notices { margin: 0 0 22px; display: none; flex-direction: column; gap: 8px; }
.notices.open { display: flex; }
.notice {
    background: var(--gray-1); border-radius: 14px;
    padding: 13px 20px; font-size: 14px; font-weight: 500; color: var(--gray-4);
}
.notice::before { content: "!"; display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; margin-right: 10px; border-radius: 50%;
    background: var(--point); color: var(--white); font-size: 11px; font-weight: 800;
    font-family: "Poppins", sans-serif; vertical-align: -3px;
}

/* 툴바: 한 줄 가로 스크롤 (상단 부서 탭과 같은 방식) */
.toolbar-wrap { position: relative; margin: 0 0 22px; }
.toolbar {
    display: flex; flex-wrap: nowrap; align-items: center; gap: 12px;
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.toolbar::-webkit-scrollbar { display: none; }
.toolbar > * { flex: 0 0 auto; }
.toolbar-more {
    position: absolute; top: 0; right: 0; height: 100%; width: 64px;
    display: flex; align-items: center; justify-content: flex-end;
    background: linear-gradient(to left, var(--page-bg) 25%, transparent);
    color: var(--gray-3); pointer-events: none;
    opacity: 0; transition: opacity .15s ease;
}
.toolbar-more svg { width: 18px; height: 18px; }
.toolbar-wrap.scrollable .toolbar-more { opacity: 1; }
.toolbar select {
    height: 42px; padding: 0 18px; font-size: 14px; font-weight: 500; color: var(--ink);
    border: 1.5px solid var(--point-soft); border-radius: var(--pill); background: var(--card);
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23111' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center; padding-right: 38px;
}
.toolbar .hint { font-size: 13px; color: var(--gray-3); }
.search-input {
    height: 42px; padding: 0 18px; font-size: 14px; font-weight: 500; color: var(--ink);
    border: 1.5px solid var(--point-soft); border-radius: var(--pill); background: var(--card);
    width: 300px; max-width: 100%; outline: none;
}
.search-input::placeholder { color: var(--gray-3); font-weight: 400; }
.search-input:focus { box-shadow: 0 0 0 3px rgba(0,85,153,.15); }
.sort-btn {
    height: 42px; padding: 0 18px; font-size: 14px; font-weight: 500; color: var(--gray-4);
    border: 1.5px solid var(--gray-2); border-radius: var(--pill); background: var(--card);
    cursor: pointer; transition: all .12s ease;
}
.sort-btn:hover { border-color: var(--point-soft); color: var(--point-soft); }
.sort-btn.active { background: var(--point); border-color: var(--point); color: var(--white); }

/* ── 리스트: 미니멀 테이블 ── */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 960px; }
thead th {
    position: sticky; top: 0; z-index: 1; background: var(--card);
    color: var(--ink); font-size: 12.5px; font-weight: 700;
    letter-spacing: .03em; padding: 14px 10px;
    border-top: 2px solid var(--point-soft); border-bottom: 1px solid var(--point-soft);
    white-space: nowrap;
}
thead th small { display: block; font-weight: 400; color: var(--gray-3); font-size: 11px; letter-spacing: 0; }
tbody td {
    text-align: center; padding: 13px 10px; font-size: 14px;
    border-bottom: 1px solid var(--gray-2); color: var(--ink);
}
tbody tr:hover { background: var(--gray-1); }
td.t-title { text-align: left; min-width: 220px; font-weight: 500; }
td.t-date { white-space: nowrap; color: var(--gray-3); font-size: 13px; font-family: "Poppins", sans-serif; font-weight: 500; }
td.t-no { color: var(--gray-3); font-size: 13px; font-family: "Poppins", sans-serif; font-weight: 500; }

/* 파일 링크: 블랙 아웃라인 필, 호버 시 반전 */
.fbtn {
    display: inline-block; padding: 4px 14px; border-radius: var(--pill);
    font-size: 12.5px; font-weight: 600; line-height: 1.6; white-space: nowrap;
    border: 1.2px solid var(--point-soft); color: var(--point-soft); background: var(--card);
    transition: all .12s ease;
}
.fbtn:hover { background: var(--point-soft); border-color: var(--point-soft); color: #fff; }
.fbtn-down { border-color: var(--gray-2); background: var(--gray-1); color: var(--gray-4); }
.fbtn-down:hover { background: var(--point-soft); border-color: var(--point-soft); color: #fff; }
.fbtn-watch { background: var(--point); border-color: var(--point); color: #fff; }
.fbtn-watch:hover { background: var(--card); color: var(--point-soft); border-color: var(--point-soft); }
.sort-tag {
    display: inline-block; padding: 3px 12px; border-radius: var(--pill);
    background: var(--gray-1); color: var(--gray-4); font-size: 12px; font-weight: 600;
}

/* ── 페이지네이션 ── */
.paging { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 40px 0 0; }
.paging a, .paging strong {
    min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; font-size: 14px; padding: 0 6px;
    font-family: "Poppins", sans-serif; font-weight: 600;
}
.paging a { color: var(--gray-3); border: 1px solid transparent; background: transparent; }
.paging a:hover { border-color: var(--point-soft); color: var(--point-soft); }
.paging strong { background: var(--point); color: var(--white); }

.empty { padding: 80px 20px; text-align: center; color: var(--gray-3); }

/* ── 맨 위로 플로팅 버튼 ── */
.to-top {
    position: fixed; right: 18px; bottom: 22px; z-index: 200;
    width: 46px; height: 46px; border-radius: 50%;
    background: var(--point); color: var(--white);
    border: 0; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,.28);
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top svg { width: 18px; height: 18px; }

/* ── 푸터 ── */
.foot {
    background: var(--point-dark); color: rgba(255,255,255,.6);
    padding: 30px 28px; font-size: 12px; letter-spacing: .04em;
    display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.foot .logo-img { display: block; height: 22px; width: auto; opacity: .85; }

/* ── 모바일: 테이블 → 라운드 타일 카드 ── */
@media (max-width: 760px) {
    .topbar { padding: 14px 18px; }
    .topbar .logo-img { display: none; } /* 모바일에선 로고 생략 */
    .top-controls { width: 100%; justify-content: space-between; }
    .hero { padding: 44px 16px 40px; }
    .hero .catch { font-size: 13.5px; }
    .hero .catch br { display: none; }
    .hero h1 { font-size: 26px; }
    .hero .hero-sub { font-size: 14px; }
    .tab-strip { padding: 10px 14px; } /* 고정 시 화면을 덜 가리게 슬림하게 */
    .tabs { justify-content: flex-start; flex-wrap: nowrap; }
    .tabs a { padding: 7px 18px; font-size: 13.5px; }
    .to-top { right: 14px; bottom: 18px; width: 44px; height: 44px; }
    .wrap { padding: 22px 14px 70px; }
    .page-title { margin-bottom: 16px; }
    .page-title h2 { font-size: 24px; }

    /* 공지·툴바: 모바일 컴팩트 */
    .notice-toggle { padding: 11px 16px; margin-bottom: 10px; }
    .notice { font-size: 13.5px; padding: 10px 14px; }
    .toolbar-wrap { margin-bottom: 14px; }
    .toolbar { gap: 8px; }
    .toolbar select, .search-input, .sort-btn { height: 36px; font-size: 13px; }
    .toolbar select { padding: 0 30px 0 13px; background-position: right 12px center; }
    .sort-btn { padding: 0 13px; }
    .search-input { width: 210px; padding: 0 14px; }
    .table-scroll { overflow: visible; }
    table { min-width: 0; }
    thead { display: none; }
    tbody tr {
        display: block; background: var(--card);
        border: 1.2px solid var(--gray-2); border-radius: var(--tile);
        padding: 16px 18px; margin-bottom: 12px;
        transition: border-color .15s ease;
    }
    tbody tr:hover { background: var(--card); border-color: var(--point-soft); }
    tbody tr[hidden] { display: none; } /* 검색 필터로 숨긴 카드 */
    tbody td { display: none; border: 0; padding: 0; }
    td.empty { display: block; } /* 검색 결과 없음 안내 */
    td.t-no { display: inline; font-size: 12px; margin-right: 8px; }
    td.t-date { display: inline; font-size: 12px; }
    td.t-sort { display: inline; float: right; }
    td.t-title { display: block; margin: 7px 0 11px; font-size: 16px; font-weight: 700; min-width: 0; }
    td.t-file { display: inline-block; margin: 3px 6px 3px 0; }
    td.t-file:empty { display: none; }
}

/* 야간 모드: 셀렉트 화살표 밝게 */
html[data-theme="dark"] .toolbar select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23e6e8eb' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
}

/* ── 폼 페이지 (bbs/write_form.php 등) ─────────────────────────────── */
.hero-compact { padding: 36px 20px 40px; }
.hero-compact h1 { font-size: clamp(24px, 3.6vw, 40px); }
.wrap-narrow { max-width: 820px; }

.form-card {
    background: var(--card); border: 1px solid var(--gray-2);
    border-radius: var(--tile); padding: 30px 32px;
}
.f-row {
    display: flex; align-items: center; gap: 18px; margin-bottom: 14px;
}
.f-label {
    flex: 0 0 120px; font-size: 14px; font-weight: 700; color: var(--ink);
}
.f-input {
    flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 16px;
    font-size: 14px; font-family: inherit; color: var(--ink);
    background: var(--card); border: 1.5px solid var(--gray-2); border-radius: 10px;
    outline: none; transition: border-color .12s ease;
}
.f-input:focus { border-color: var(--point-soft); box-shadow: 0 0 0 3px rgba(0,85,153,.12); }
.f-input::placeholder { color: var(--gray-3); font-weight: 400; }
select.f-input { appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px;
}
.f-file { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.f-file .f-input { flex: 1 1 260px; padding: 8px 12px; height: auto; font-size: 13px; }
.f-file .f-input::file-selector-button {
    margin-right: 12px; padding: 6px 14px; border: 1.2px solid var(--point-soft);
    border-radius: var(--pill); background: var(--card); color: var(--point-soft);
    font-size: 12.5px; font-weight: 600; font-family: inherit; cursor: pointer;
}
.f-file .f-input::file-selector-button:hover { background: var(--point-soft); color: #fff; }
.f-help { font-size: 12.5px; color: var(--gray-3); }
.f-divider { height: 1px; background: var(--gray-2); margin: 22px 0; }
.f-actions { display: flex; justify-content: center; gap: 10px; margin-top: 26px; }
.btn-primary {
    min-width: 160px; height: 46px; padding: 0 28px;
    background: var(--point); color: #fff; border: 1.5px solid var(--point);
    border-radius: var(--pill); font-size: 15px; font-weight: 700; font-family: inherit;
    cursor: pointer; transition: background .12s ease;
}
.btn-primary:hover { background: var(--point-dark); border-color: var(--point-dark); }
.btn-ghost {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 120px; height: 46px; padding: 0 24px;
    border: 1.5px solid var(--gray-2); border-radius: var(--pill);
    background: var(--card); color: var(--gray-4); font-size: 15px; font-weight: 500;
}
.btn-ghost:hover { border-color: var(--point-soft); color: var(--point-soft); }

@media (max-width: 760px) {
    .form-card { padding: 20px 16px; }
    .f-row { flex-direction: column; align-items: stretch; gap: 6px; margin-bottom: 16px; }
    .f-label { flex: none; }
    .f-label br { display: none; }
    .f-actions { flex-direction: column; }
    .btn-primary, .btn-ghost { width: 100%; }
}
.hero-sub .uid { color: rgba(255,255,255,.55); font-size: 13px; }

/* 공과글쓰기(관리자) 버튼: 제목 줄 우측 */
.btn-write {
    display: inline-flex; align-items: center; gap: 7px;
    margin-left: auto; height: 40px; padding: 0 20px;
    background: var(--point); color: #fff !important;
    border-radius: var(--pill); font-size: 14px; font-weight: 700;
    transition: background .12s ease;
}
.btn-write:hover { background: var(--point-dark); }
.btn-write svg { width: 15px; height: 15px; }
@media (max-width: 760px) {
    .btn-write { height: 36px; padding: 0 16px; font-size: 13px; }
}
.f-note { margin: 0 0 16px; font-size: 13px; color: var(--gray-3); }
.btn-danger {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 100px; height: 46px; padding: 0 24px;
    border: 1.5px solid #d4a09a; border-radius: var(--pill);
    background: var(--card); color: #c0392b; font-size: 15px; font-weight: 500;
}
.btn-danger:hover { background: #c0392b; border-color: #c0392b; color: #fff; }
