@charset "utf-8";

:root {
    --rb-main-color: #3b82f6;
    --rb-header-color: #fff;
    --line: #e5e7eb;
    --text: #111827;
}

/* 헤더 전체 레이아웃 */
.rb-header-wrap { background: var(--rb-header-color); border-bottom: 1px solid var(--line); position: relative; z-index: 100; display: flex; flex-direction: column; }
.header-layout { max-width: 1300px; margin: 0 auto; padding: 0 20px; position: relative; }

/* [1단] 상단 */
.header-top { border-bottom: 1px solid #f3f4f6; }
.header-top .header-layout { height: 170px; display: flex; align-items: center; justify-content: space-between; }

/* 1. 좌측 (햄버거) */
.header-left { flex: 1; display: flex; align-items: center; }
.gnb_hamburger { background: none; border: none; cursor: pointer; padding: 8px; color: var(--text); margin-left: -8px; display: flex; border-radius: 4px; }
.gnb_hamburger:hover { background: #f9fafb; color: var(--rb-main-color); }

/* 2. 중앙 (로고) */
.header-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 10; }
.logo-link img { height: 155px; width: auto; display: block; }

/* 3. 우측 (검색, 유틸) */
.header-right { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 15px; }

/* 검색창 */
.header_search { position: relative; }
.header_search .sch-inp { width: 220px; height: 38px; padding: 0 35px 0 15px; border: 1px solid var(--line); border-radius: 20px; background: #f9fafb; font-size: 14px; outline: none; transition: all 0.2s; }
.header_search .sch-inp:focus { background: #fff; border-color: var(--rb-main-color); width: 260px; }
.header_search .search_button { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: none; background: none; color: #6b7280; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* 유틸 메뉴 (PC용) */
.header_utils { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; }
.header_utils a { text-decoration: none; color: #4b5563; }

/* 관리자 버튼 스타일 */
.admin-btn { display: inline-flex; align-items: center; gap: 4px; background: #333; color: #fff !important; padding: 6px 12px; border-radius: 4px; font-size: 12px; font-weight: bold; transition: opacity 0.2s; }
.admin-btn:hover { opacity: 0.8; }

/* 유저 프로필 & 카드 */
.user-menu { position: relative; }
.user-avatar img { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); display: block; cursor: pointer; }

/* 드롭다운 카드 디자인 */
.user-card {
    display: none; position: absolute; top: 100%; right: 0; margin-top: 10px;
    width: 240px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12); overflow: hidden; z-index: 1000;
}
.user-menu:hover .user-card { display: block; }

.uc-head { padding: 15px; background: #f9fafb; border-bottom: 1px solid #eee; display: flex; align-items: center; gap: 12px; }
.uc-head .uc-avatar img { width: 48px; height: 48px; }
.uc-meta { display: flex; flex-direction: column; justify-content: center; }
.uc-name { font-size: 15px; font-weight: bold; color: #111; }
.uc-lvl { font-size: 12px; color: var(--rb-main-color); font-weight: 600; margin-top: 2px; }
.uc-email { font-size: 11px; color: #888; margin-top: 1px; }

.uc-stats { list-style: none; padding: 15px 0; margin: 0; display: flex; border-bottom: 1px solid #eee; }
.uc-stats li { flex: 1; text-align: center; border-right: 1px solid #eee; }
.uc-stats li:last-child { border: none; }
.uc-stats a { display: block; }
.uc-stats .tit { display: block; font-size: 11px; color: #888; margin-bottom: 4px; }
.uc-stats .val { display: block; font-size: 14px; font-weight: bold; color: #333; }
.uc-stats li:hover .val { color: var(--rb-main-color); }

.uc-links { display: flex; background: #fff; }
.uc-links a { flex: 1; display: block; text-align: center; padding: 12px 0; font-size: 13px; color: #555; transition: background 0.2s; }
.uc-links a:hover { background: #f9fafb; font-weight: 600; }
.uc-links .logout { border-left: 1px solid #eee; color: #e11d48; }

/* 비로그인 버튼 */
.login-btn, .join-btn { padding: 6px 12px; border-radius: 4px; font-size: 13px; }
.login-btn { color: #333; }
.join-btn { background: var(--rb-main-color); color: #fff !important; }
.join-btn:hover { background: #2563eb; }


/* [2단] 하단 (전체 메뉴 GNB) */
.header-bottom { background:#83a8bd }
.header-bottom .header-layout { height: 50px; display: flex; justify-content: center; }

.gnb-list { display: flex; align-items: center; gap: 30px; margin: 0; padding: 0; list-style: none; height: 100%; }
.gnb-item { height: 100%; display: flex; align-items: center; position: relative; }
.gnb-link { display: block; font-size: 16px; font-weight: 600; color: #fff; text-decoration: none; padding: 0 5px; transition: color 0.2s; }
.gnb-link:hover { color:#b5cfdd }

/* 서브 메뉴 */
.gnb-sub-wrap { display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); min-width: 160px; padding-top: 10px; z-index: 999; }
.gnb-item:hover .gnb-sub-wrap { display: block; }
.gnb-sub { background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); padding: 10px 0; list-style: none; margin: 0; }
.gnb-sub a { display: block; padding: 8px 20px; font-size: 14px; color: #4b5563; text-decoration: none; white-space: nowrap; }
.gnb-sub a:hover { background: #f9fafb; color: var(--rb-main-color); }


/* 반응형 (모바일) */
.mobile-only { display: none; }

@media (max-width: 1024px) {
    .pc-only { display: none !important; }
    .mobile-only { display: block; }

    .header-top .header-layout { height: 60px; padding: 0 15px; }
    .header-bottom { display: none; } /* 모바일에서 2단 메뉴 숨김 */

    .logo-link img { height: 26px; }
    .search_icon_mo { border: none; background: none; padding: 5px; color: #111; cursor: pointer; display: flex; }
}