/* =============================================================
   이우드림무역 게시판(공지사항 / 자주하는질문) 공용 스타일
   - load: notice.php, notice_view.php, faq.php (db/stylesheet.php 이후)
   - 토큰: 액센트 그라디언트 #667eea→#764ba2, 히어로 #0f0c29→#302b63→#24243e
           카드 radius 16px / border #f0f0f0 / shadow rgba(0,0,0,.04)
           브레이크포인트 991px / 768px / 480px
   ============================================================= */

/* ===== Base ===== */
body { opacity: 0; transition: opacity 0.5s ease; }
body.page-loaded { opacity: 1; }
html { scroll-behavior: smooth; }
.board-container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* ===== Page Hero ===== */
.board-hero {
    position: relative;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    padding: 56px 0 46px; overflow: hidden;
}
.board-hero::before {
    content: ''; position: absolute; top: -50%; right: -20%;
    width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, rgba(102,126,234,0.2) 0%, transparent 70%);
}
.board-hero .board-container { position: relative; z-index: 2; }
.board-hero h1 { font-size: 2.2rem; font-weight: 800; color: #fff; margin: 0 0 10px; }
.board-hero h1 .gradient-text {
    background: linear-gradient(135deg, #a78bfa, #60a5fa, #34d399);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.board-hero .hero-sub { font-size: 1rem; color: rgba(255,255,255,0.65); margin: 0; }

/* ===== Breadcrumb ===== */
.board-breadcrumb { background: #f8f9fa; border-bottom: 1px solid #e9ecef; padding: 12px 0; }
.board-breadcrumb .board-container { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.board-breadcrumb a { color: #667eea; text-decoration: none; font-size: 0.88rem; font-weight: 500; }
.board-breadcrumb a:hover { text-decoration: underline; }
.board-breadcrumb .bc-sep { color: #ccc; font-size: 0.8rem; }
.board-breadcrumb .bc-current { color: #333; font-size: 0.88rem; font-weight: 600; }

/* ===== Content Card ===== */
.board-wrap { padding: 34px 0 80px; }
.board-card {
    background: #fff; border-radius: 16px; padding: 30px 32px;
    border: 1px solid #f0f0f0; box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.board-card-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; flex-wrap: wrap; margin-bottom: 18px;
    padding-bottom: 16px; border-bottom: 2px solid #f0f0f5;
}
.board-card-title {
    display: flex; align-items: center; gap: 12px;
    font-size: 1.35rem; font-weight: 800; color: #1a1a2e; margin: 0;
}
.board-card-title .board-icon {
    width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff; font-size: 1rem;
}
.board-card-title .board-icon.faq { background: linear-gradient(135deg, #34d399, #60a5fa); }
.board-count { font-size: 0.82rem; color: #888; font-weight: 600; }

/* ===== Tabs (group_code 필터) ===== */
.board-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.board-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 15px; border-radius: 20px; border: 1px solid #e9ecef;
    background: #fff; color: #666; font-size: 0.83rem; font-weight: 600;
    text-decoration: none; transition: all 0.2s ease;
}
.board-tab:hover { border-color: #667eea; color: #667eea; background: #f5f3ff; }
.board-tab.is-active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(102,126,234,0.25);
}
.board-tab .tab-count { font-size: 0.72rem; opacity: 0.75; font-variant-numeric: tabular-nums; }

/* ===== Search ===== */
.board-tools { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.board-search { display: flex; gap: 8px; margin-left: auto; }
.board-search .bs-select,
.board-search .bs-input,
.board-search .bs-btn {
    height: 38px; border-radius: 10px; border: 1px solid #e5e7eb;
    font-size: 0.85rem; color: #333; background: #fff;
}
.board-search .bs-select { padding: 0 10px; min-width: 92px; cursor: pointer; }
.board-search .bs-input { padding: 0 14px; width: 210px; }
.board-search .bs-input:focus,
.board-search .bs-select:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.12); }
.board-search .bs-btn {
    padding: 0 18px; border: 0; cursor: pointer; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.board-search .bs-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(102,126,234,0.3); }

/* ===== 목록 테이블 ===== */
.board-table { width: 100%; border-collapse: collapse; }
.board-table thead th {
    background: #f8f9fa; color: #555; font-size: 0.8rem; font-weight: 700;
    padding: 12px 14px; text-align: left;
    border-top: 2px solid #ececf2; border-bottom: 1px solid #ececf2;
}
.board-table tbody td {
    padding: 14px; font-size: 0.9rem; color: #444;
    border-bottom: 1px solid #f2f2f6; vertical-align: middle;
}
.board-table tbody tr { transition: background 0.18s ease; }
.board-table tbody tr:hover { background: #fafaff; }
.board-table .col-no { width: 74px; text-align: center; color: #a0a0a8; font-variant-numeric: tabular-nums; }
.board-table .col-group { width: 108px; text-align: center; }
.board-table .col-hit { width: 78px; text-align: center; color: #a0a0a8; font-size: 0.8rem; }
.board-table .col-date { width: 108px; text-align: center; color: #a0a0a8; font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.board-table .col-title a {
    color: #333; text-decoration: none; font-weight: 600;
    display: inline-flex; align-items: center; gap: 8px;
}
.board-table .col-title a:hover { color: #667eea; }
.board-badge {
    display: inline-block; font-size: 0.7rem; font-weight: 700; color: #667eea;
    background: #eef2ff; padding: 3px 9px; border-radius: 12px; white-space: nowrap;
}
.board-badge.fixed { color: #fff; background: linear-gradient(135deg, #f97316, #ef4444); }
.board-badge.new { color: #fff; background: linear-gradient(135deg, #667eea, #764ba2); }
.board-title-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 520px; display: inline-block; vertical-align: middle; }

/* ===== 페이징 ===== */
.board-pager { display: flex; justify-content: center; align-items: center; gap: 5px; margin-top: 26px; flex-wrap: wrap; }
.board-pager .pg-btn,
.board-pager .pg-num {
    min-width: 34px; height: 34px; padding: 0 10px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid #e9ecef; background: #fff; color: #666;
    font-size: 0.84rem; font-weight: 600; text-decoration: none;
    transition: all 0.18s ease;
}
.board-pager .pg-btn:hover, .board-pager .pg-num:hover { border-color: #667eea; color: #667eea; }
.board-pager .pg-num.is-active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: transparent; color: #fff;
}
.board-pager .pg-btn.is-disabled { opacity: 0.4; pointer-events: none; }
.board-pager .pg-dots { color: #ccc; padding: 0 2px; }

/* ===== 상세 보기 ===== */
.board-view-head { border-bottom: 1px solid #f0f0f5; padding-bottom: 18px; margin-bottom: 26px; }
.board-view-meta-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.board-view-title { font-size: 1.6rem; font-weight: 800; color: #1a1a2e; margin: 0 0 14px; line-height: 1.4; }
.board-view-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 0.82rem; color: #999; }
.board-view-meta i { margin-right: 5px; color: #b6b6c2; }

.board-view-foot { margin-top: 34px; padding-top: 22px; border-top: 1px solid #f0f0f5; }
.board-nav { list-style: none; margin: 0 0 18px; padding: 0; }
.board-nav li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; }
.board-nav li + li { background: #f8f9fa; }
.board-nav .nav-label {
    flex-shrink: 0; width: 74px; font-size: 0.78rem; font-weight: 700; color: #667eea;
}
.board-nav a { flex: 1; min-width: 0; color: #444; text-decoration: none; font-size: 0.88rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-nav a:hover { color: #667eea; }
.board-nav .is-empty { flex: 1; color: #c2c2cc; font-size: 0.88rem; }
.board-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.board-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; border-radius: 10px; font-size: 0.85rem; font-weight: 700;
    text-decoration: none; cursor: pointer; border: 1px solid #e5e7eb;
    background: #fff; color: #555; transition: all 0.2s ease;
}
.board-btn:hover { border-color: #667eea; color: #667eea; }
.board-btn.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: transparent; color: #fff;
}
.board-btn.primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(102,126,234,0.3); }

/* ===== 리치 본문 (board_html 출력) ===== */
.board-body { color: #444; line-height: 1.8; font-size: 0.95rem; word-break: keep-all; }
.board-body h2, .board-body h3 { font-size: 1.15rem; font-weight: 700; color: #1a1a2e; margin: 28px 0 12px; }
.board-body h4 { font-size: 1rem; font-weight: 700; color: #1a1a2e; margin: 22px 0 10px; }
.board-body h5, .board-body h6 { font-size: 0.95rem; font-weight: 700; color: #333; margin: 18px 0 8px; }
.board-body p { margin: 0 0 14px; }
.board-body ul, .board-body ol { padding-left: 22px; margin: 0 0 14px; }
.board-body li { margin-bottom: 6px; }
.board-body a { color: #667eea; text-decoration: none; font-weight: 600; }
.board-body a:hover { text-decoration: underline; }
.board-body strong { color: #1a1a2e; }
.board-body code {
    background: #f4f4f9; padding: 2px 6px; border-radius: 5px;
    font-size: 0.86em; color: #7c3aed;
}
.board-body pre {
    background: #f8f9fa; border: 1px solid #ececf2; border-radius: 10px;
    padding: 14px 16px; overflow-x: auto; font-size: 0.85rem;
}
.board-body blockquote {
    margin: 18px 0; padding: 12px 18px; background: #f8f9fa;
    border-left: 3px solid #667eea; color: #666; border-radius: 0 10px 10px 0;
}
.board-body .info-box {
    background: #f0f4ff; border-left: 4px solid #667eea;
    padding: 16px 20px; border-radius: 0 10px 10px 0; margin: 20px 0;
}
.board-body .warn-box {
    background: #fff8f0; border-left: 4px solid #f59e0b;
    padding: 16px 20px; border-radius: 0 10px 10px 0; margin: 20px 0;
}
.board-body table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.board-body th, .board-body td {
    padding: 10px 14px; border: 1px solid #e5e7eb; text-align: left; font-size: 0.9rem;
}
.board-body th { background: #f8f9fa; font-weight: 700; color: #333; }
.board-body img { max-width: 100%; height: auto; border-radius: 10px; margin: 12px 0; }
.board-body hr { border: 0; border-top: 1px dashed #e5e7eb; margin: 22px 0; }

/* ===== FAQ 아코디언 ===== */
.board-accordion { border-top: 2px solid #ececf2; }
.ba-item { border-bottom: 1px solid #f0f0f5; }
.ba-q {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 17px 8px; background: none; border: 0; cursor: pointer; text-align: left;
    font-size: 0.95rem; font-weight: 600; color: #333; transition: color 0.2s ease;
}
.ba-q:hover { color: #667eea; }
.ba-q:focus-visible { outline: 2px solid #667eea; outline-offset: 2px; border-radius: 8px; }
.ba-no {
    flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    background: #f0f4ff; color: #667eea; font-size: 0.76rem; font-weight: 800;
}
.ba-q[aria-expanded="true"] .ba-no { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; }
.ba-group { flex-shrink: 0; font-size: 0.7rem; font-weight: 700; color: #8b8b9a;
    background: #f4f4f9; padding: 3px 9px; border-radius: 12px; }
.ba-q-text { flex: 1; min-width: 0; }
.ba-caret { flex-shrink: 0; font-size: 0.75rem; color: #b6b6c2; transition: transform 0.25s ease; }
.ba-q[aria-expanded="true"] .ba-caret { transform: rotate(180deg); color: #667eea; }
.ba-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.ba-a-inner { padding: 4px 8px 20px 46px; }
.ba-a-inner .board-body { font-size: 0.9rem; }
.ba-link {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
    font-size: 0.78rem; font-weight: 700; color: #667eea; text-decoration: none;
}
.ba-link:hover { text-decoration: underline; }
.ba-tools { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 14px; }
.ba-tool {
    padding: 6px 14px; border-radius: 18px; border: 1px solid #e9ecef; background: #fff;
    font-size: 0.78rem; font-weight: 600; color: #777; cursor: pointer; transition: all 0.18s ease;
}
.ba-tool:hover { border-color: #667eea; color: #667eea; background: #f5f3ff; }

/* ===== 빈 결과 / 안내 ===== */
.board-empty { padding: 60px 20px; text-align: center; color: #b6b6c2; }
.board-empty i { font-size: 2rem; display: block; margin-bottom: 14px; }
.board-empty p { margin: 0 0 18px; font-size: 0.9rem; }
.board-note {
    display: flex; align-items: flex-start; gap: 12px; margin-top: 24px;
    padding: 16px 18px; border-radius: 12px; background: #f8f9fa;
    border: 1px dashed #e5e7eb; font-size: 0.84rem; color: #777; line-height: 1.6;
}
.board-note i { color: #667eea; margin-top: 2px; }

/* ===== 애니메이션 ===== */
.fade-up { opacity: 0; transform: translateY(20px); transition: all 0.5s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .board-hero h1 { font-size: 1.8rem; }
    .board-card { padding: 24px 20px; }
    .board-title-text { max-width: 300px; }
}
@media (max-width: 768px) {
    .board-hero { padding: 40px 0 32px; }
    .board-hero h1 { font-size: 1.5rem; }
    .board-wrap { padding: 20px 0 56px; }
    .board-card { padding: 20px 14px; border-radius: 12px; }
    .board-card-title { font-size: 1.15rem; }
    .board-view-title { font-size: 1.25rem; }
    .board-search { width: 100%; margin-left: 0; }
    .board-search .bs-input { flex: 1; width: auto; }
    .board-table thead { display: none; }
    .board-table tbody tr {
        display: block; border-bottom: 1px solid #f0f0f5; padding: 12px 2px;
    }
    .board-table tbody td { display: block; padding: 3px 0; border: 0; }
    .board-table .col-no { display: none; }
    .board-table .col-title { order: 1; }
    .board-table .col-title a { white-space: normal; }
    .board-table .board-title-text { max-width: 100%; white-space: normal; }
    .board-table .col-group { order: 2; text-align: left; width: auto; padding-top: 6px; }
    .board-table .col-date, .board-table .col-hit {
        display: inline-block; width: auto; text-align: left; order: 3; padding-top: 6px;
    }
    .board-table .col-hit { margin-left: 12px; }
    .ba-q { padding: 14px 4px; font-size: 0.9rem; gap: 8px; }
    .ba-group { display: none; }
    .ba-a-inner { padding: 4px 4px 16px 34px; }
    .board-nav .nav-label { width: 62px; }
}
@media (max-width: 480px) {
    .board-tabs { gap: 6px; }
    .board-tab { padding: 6px 12px; font-size: 0.78rem; }
    .board-actions .board-btn { flex: 1; justify-content: center; }
}
