/* NowIT - 클리앙 스타일 레이아웃 CSS v2 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Malgun Gothic', '맑은 고딕', sans-serif; font-size: 14px; background: #f5f5f5; color: #333; }
a { color: #333; text-decoration: none; }
a:hover { color: #e84118; }

/* ===== PC 유틸바 ===== */
#util-bar { background: #222; color: #ccc; font-size: 12px; border-bottom: 1px solid #111; }
#util-bar .inner { max-width: 1200px; margin: 0 auto; padding: 6px 12px; display: flex; justify-content: space-between; align-items: center; }
#util-bar .site-name a { color: #fff; font-size: 15px; font-weight: bold; letter-spacing: -0.5px; }
#util-bar .util-right { display: flex; gap: 12px; align-items: center; }
#util-bar .util-right a { color: #ccc; font-size: 12px; }
#util-bar .util-right a:hover { color: #fff; }
#util-bar .nickname { color: #aaa; }

/* ===== PC GNB ===== */
#gnb { background: #fff; border-bottom: 2px solid #e84118; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 4px rgba(0,0,0,0.08); }
#gnb .inner { max-width: 1200px; margin: 0 auto; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; }
#category-nav { display: flex; gap: 0; }
#category-nav .nav-item { display: block; padding: 12px 14px; font-size: 14px; font-weight: 500; color: #333; border-bottom: 3px solid transparent; transition: all 0.15s; white-space: nowrap; }
#category-nav .nav-item:hover, #category-nav .nav-item.active { color: #e84118; border-bottom-color: #e84118; }
.gnb-search { display: flex; align-items: center; }
.search-input { border: 1px solid #ddd; padding: 5px 10px; font-size: 13px; width: 180px; border-radius: 3px 0 0 3px; outline: none; }
.search-input:focus { border-color: #e84118; }
.search-btn { background: #e84118; color: #fff; border: none; padding: 6px 12px; font-size: 13px; cursor: pointer; border-radius: 0 3px 3px 0; }

/* ===== 모바일 상단 헤더 (PC 숨김) ===== */
#mobile-header { display: none; }

/* ===== 본문 ===== */
#wrap { max-width: 1200px; margin: 0 auto; padding: 16px 12px; min-height: calc(100vh - 150px); }
#content-area { background: #fff; border: 1px solid #e0e0e0; border-radius: 2px; }

/* ===== 게시판 스타일 ===== */
#content-area .board-list { width: 100%; border-collapse: collapse; }
#content-area .board-list th { background: #f8f8f8; border-top: 2px solid #333; border-bottom: 1px solid #ddd; padding: 8px 10px; font-size: 13px; text-align: center; }
#content-area .board-list td { border-bottom: 1px solid #f0f0f0; padding: 8px 10px; font-size: 13px; }
#content-area .board-list tr:hover td { background: #fafafa; }
#content-area .board-list .title a { color: #333; }
#content-area .board-list .title a:hover { color: #e84118; text-decoration: underline; }
#content-area .board-header { padding: 14px 16px; border-bottom: 1px solid #e0e0e0; display: flex; justify-content: space-between; align-items: center; }
#content-area .board-title { font-size: 16px; font-weight: bold; color: #333; }
#content-area .write-btn { background: #e84118; color: #fff; padding: 6px 16px; border-radius: 3px; font-size: 13px; }
.pagination { text-align: center; padding: 16px; }
.pagination a, .pagination strong { display: inline-block; padding: 4px 10px; margin: 0 2px; border: 1px solid #ddd; font-size: 13px; color: #333; }
.pagination strong { background: #e84118; color: #fff; border-color: #e84118; }

/* ===== PC 푸터 ===== */
#footer { background: #333; color: #999; padding: 20px 12px; margin-top: 20px; }
#footer .inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
#footer .footer-links { display: flex; gap: 12px; list-style: none; }
#footer .footer-links a { color: #999; }
#footer .footer-links a:hover { color: #fff; }

/* ===== 모바일 하단 바 / 오버레이 (PC 숨김) ===== */
#mobile-bottom-bar { display: none; }
#mobile-menu-overlay { display: none; }

/* ===========================
   모바일 반응형
   =========================== */
@media (max-width: 768px) {
  /* PC 요소 숨김 */
  #util-bar { display: none; }
  #gnb { display: none; }
  #footer { display: none; }

  /* 모바일 상단 헤더 */
  #mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #222;
    padding: 0 14px;
    height: 48px;
    position: sticky;
    top: 0;
    z-index: 200;
  }
  .mobile-logo {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: -0.5px;
  }
  .mobile-header-right { display: flex; align-items: center; gap: 8px; }
  .mobile-icon-btn { color: #ccc; display: flex; align-items: center; }
  .mobile-login-btn { color: #fff; font-size: 13px; background: #e84118; padding: 5px 12px; border-radius: 3px; }

  /* 본문 */
  #wrap { padding: 0; padding-bottom: 64px; }
  #content-area { border: none; border-radius: 0; border-bottom: 1px solid #e0e0e0; }

  /* 모바일 하단 고정 바 */
  #mobile-bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    z-index: 300;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
  }
  .bottom-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #555;
    font-size: 11px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
  }
  .bottom-btn svg { color: #555; }
  .bottom-btn:hover, .bottom-btn:active { color: #e84118; }
  .bottom-btn:hover svg, .bottom-btn:active svg { color: #e84118; }

  /* 모바일 메뉴 오버레이 */
  #mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 400;
  }
  #mobile-menu-overlay.open { display: block; }

  /* 메뉴 패널 (하단에서 슬라이드업) */
  #mobile-menu-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.2s ease;
  }
  @keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  .menu-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #eee;
    font-weight: bold;
    font-size: 15px;
  }
  .menu-close-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
  }
  .menu-panel-nav { padding: 8px 0; }
  .menu-panel-item {
    display: block;
    padding: 14px 20px;
    font-size: 15px;
    color: #333;
    border-bottom: 1px solid #f5f5f5;
  }
  .menu-panel-item:hover, .menu-panel-item:active { background: #fef5f3; color: #e84118; }
  .menu-panel-footer { padding: 12px 20px; border-top: 1px solid #eee; }
  .menu-panel-admin { font-size: 13px; color: #999; }

  /* 게시판 테이블 모바일 */
  #content-area .board-list th,
  #content-area .board-list td { padding: 8px 10px; font-size: 13px; }
}

@media (max-width: 480px) {
  #mobile-header { height: 44px; }
  .mobile-logo { font-size: 16px; }
  #wrap { padding-bottom: 60px; }
}
