@charset "utf-8";

/* =================================================================
   Trupex 공통 디자인 시스템 (custom_layout.css)
   - 최종 수정: 게시판(리스트/보기/쓰기) 스타일 완벽 통합
   ================================================================= */

/* 1. [초기화] 그누보드 & 브라우저 기본 스타일 강제 리셋 */
* { box-sizing: border-box !important; }

html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    margin: 0 !important; padding: 0 !important;
}

/* 그누보드 래퍼 강제 확장 & 패딩 초기화 방지 */
/* 주의: #hd, #gnb는 head.php의 설정을 따르도록 제외함 */
#wrapper, #container, .wrapper {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important; margin: 0 !important;
}

/* 상단 타이틀 숨기기 */
#container_title, .sub_title, #bo_gall h2 { display: none !important; }


/* 2. [변수] 컬러 팔레트 정의 */
:root {
    --b-bg: #0b0e11;        /* 전체 배경 */
    --b-card: #1e2329;      /* 카드 배경 */
    --b-border: #2b3139;    /* 테두리 */
    --b-text-main: #eaecef; /* 메인 텍스트 */
    --b-text-sub: #848e9c;  /* 서브 텍스트 */
    --b-blue: #64B5F6; 
    --b-red: #F6465D; 
    --b-green: #0ECB81; 
    --b-yellow: #f0b90b;
}

body { background-color: var(--b-bg) !important; color: var(--b-text-main); font-family: 'Pretendard', sans-serif; }


/* 3. [레이아웃] 메인 컨테이너 */
.layout-wrapper, .strategy-container {
    max-width: 1400px; 
    margin: 0 auto; 
    width: 100%;
    padding: clamp(20px, 3vw, 30px) clamp(15px, 2vw, 20px) !important;
}


/* =================================================================
   4. [헤더] 로고, 버튼, 검색창
   ================================================================= */
.site-logo, .mobile-logo {
    font-size: 28px; font-weight: 800; color: #fff !important;
    text-decoration: none; letter-spacing: -1px; font-family: 'Pretendard', sans-serif;
    white-space: nowrap;
}
.site-logo span, .mobile-logo span { color: var(--b-blue); }

/* 투명 아이콘 버튼 */
.gnb_menu_btn, .hd_opener {
    background-color: transparent !important;   
    background-image: none !important;          
    border: 1px solid var(--b-border) !important; 
    color: #fff !important;
    border-radius: 6px !important;
    cursor: pointer;
    display: flex !important; align-items: center; justify-content: center;
    padding: 0 !important;
}
.gnb_menu_btn { width: 45px !important; height: 45px !important; margin-right: 15px; }
.hd_opener { border: none !important; width: 44px; height: 44px; font-size: 22px; }

.gnb_menu_btn:hover, .hd_opener:hover { border-color: var(--b-text-sub) !important; color: var(--b-blue) !important; }
.gnb_menu_btn i, .gnb_menu_btn .fa { color: inherit !important; display: inline-block !important; }

/* 검색창 */
.hd_sch_wr { width: 100% !important; display: block; margin-top: 5px; max-width: 100% !important; }
.sch_box, #hd_sch { position: relative; width: 100%; }

#sch_stx, #hd_sch input[type="text"] {
    background: var(--b-card) !important; 
    border: 1px solid var(--b-border) !important;
    color: #fff !important; 
    border-radius: 12px !important; 
    height: 46px !important; 
    padding: 0 50px 0 20px !important;
    width: 100% !important; 
    font-size: 15px;
    box-sizing: border-box !important;
    outline: none;
}
#sch_stx:focus { border-color: var(--b-blue) !important; }


/* =================================================================
   5. [전체메뉴] 모바일 텍스트 리스트형
   ================================================================= */
#gnb {
    background-color: #121212 !important; 
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999; padding: 20px 25px;
    overflow-y: auto; display: none;
    box-sizing: border-box !important;
}

#gnb_close {
    position: absolute; top: 20px; right: 20px;
    background: transparent; border: none; color: #fff; font-size: 28px; cursor: pointer;
}

.gnb_title {
    font-size: 32px; font-weight: 900; color: #fff;
    margin-top: 60px; margin-bottom: 30px;
    padding-bottom: 20px; border-bottom: 1px solid #333;
}

#gnb_1dul { margin: 0; padding: 0; display: block; background: transparent !important; }
.gnb_1dli { width: 100%; list-style: none; margin-bottom: 25px; background: transparent !important; border: none !important; }

.gnb_1da {
    display: block; background: transparent !important;
    color: #fff !important; font-size: 20px; font-weight: 700;
    text-decoration: none; padding-left: 15px; position: relative;
}
.gnb_1da::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 4px; height: 18px; background-color: #fff; border-radius: 2px;
}

#hd_nb { margin-top: 40px; padding: 20px 0 0; border-top: 1px solid #333; background: transparent !important; display: flex; flex-wrap: wrap; gap: 10px; }
#hd_nb li { list-style: none; width: 48%; background: transparent !important; margin-bottom: 10px; }
#hd_nb li a { color: #848e9c !important; font-size: 15px; font-weight: 600; text-decoration: none; display: flex; align-items: center; gap: 8px; }
#hd_nb li i { color: var(--b-blue); width: 20px; text-align: center; }


/* =================================================================
   6. [검색 레이어] 헤더 아래 슬라이드
   ================================================================= */
#user_menu {
    background-color: var(--b-bg) !important; 
    border-bottom: 1px solid var(--b-border);
    position: absolute; top: 60px; left: 0; right: 0;
    padding: 15px 20px; z-index: 900; display: none;
    overflow: hidden !important; height: auto !important;
    box-shadow: none !important;
}
#user_close {
    position: absolute; right: 5px; top: 0; bottom: 0;
    background: transparent; border: none; color: #848e9c; font-size: 20px; cursor: pointer;
    width: 40px; display: flex; align-items: center; justify-content: center;
}


/* =================================================================
   7. [컨텐츠] 카드 및 그리드
   ================================================================= */
.page-header { margin-bottom: 25px; border-bottom: 1px solid var(--b-border); padding-bottom: 15px; }
.page-title { font-size: clamp(22px, 5vw, 28px); font-weight: bold; color: var(--b-text-main); margin-bottom: 8px; }
.page-desc { font-size: 14px; color: var(--b-text-sub); }

.std-card, .st-card, .history-card {
    background-color: var(--b-card); border: 1px solid var(--b-border); border-radius: 12px; 
    padding: clamp(20px, 4vw, 30px); box-shadow: 0 4px 20px rgba(0,0,0,0.3); 
    margin-bottom: 25px; width: 100%; word-break: keep-all; overflow-wrap: break-word;
}

.intro-box, .page-intro { 
    position: relative; margin-bottom: 30px; padding: 25px; 
    background: linear-gradient(135deg, rgba(30, 35, 41, 0.9) 0%, rgba(43, 49, 57, 0.5) 100%);
    border: 1px solid var(--b-border); border-radius: 12px; 
    width: 100%; color: #d1d4d9; line-height: 1.7; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.split-layout, .st-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 25px; align-items: start; width: 100%; }
.icon-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 30px; width: 100%; }


/* =================================================================
   8. [푸터]
   ================================================================= */
#ft {
    background-color: var(--b-bg) !important; border-top: 1px solid var(--b-border);
    color: #555b63; font-size: 13px; padding: 40px 0 60px; margin-top: 50px; position: relative;
}
#ft_wr {
    width: 100% !important; max-width: 1400px !important; margin: 0 auto; padding: 0 20px;
    display: flex; flex-direction: column; align-items: flex-start; gap: 20px;
}
#ft_link { display: flex; flex-wrap: wrap; gap: 20px; width: 100%; }
#ft_link a { color: #76808e; text-decoration: none; transition: color 0.3s; font-weight: bold; }
#ft_link a:hover { color: #b0b8c4; }
#ft_company { width: 100%; text-align: left; line-height: 1.6; color: #484f58; }
.ft_info_row { display: block; margin-bottom: 5px; }
#ft_copy { color: #57606a; margin-top: 10px; }
#top_btn {
    position: fixed; bottom: 20px; right: 20px; width: 40px; height: 40px;
    background: rgba(50,50,50,0.8); color: #fff; border: none; border-radius: 5px; z-index: 999; cursor: pointer;
}




/* =================================================================
   11. [반응형] 미디어 쿼리 통합
   ================================================================= */

/* 태블릿 (1200px 이하) */
@media (max-width: 1200px) {
    .split-layout, .st-layout { display: flex; flex-direction: column; gap: 20px; }
    .layout-wrapper { padding: 20px 15px !important; }
    .hd_login { margin-top: 10px; width: 100%; justify-content: flex-end; }
}

/* 모바일 (768px 이하) */
@media (max-width: 768px) {
    .icon-grid, .indicator-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
    .std-card, .page-intro, #bo_v, #bo_vc_w { padding: 20px 15px !important; }
    
    #ft { padding: 30px 0 50px; }
    #ft_link { gap: 15px; font-size: 12px; }
    #ft_company { font-size: 12px; }
    
    .gnb_menu_btn { margin-right: 0 !important; width: 40px !important; height: 40px !important; }
    
    /* 게시판 모바일 최적화 */
    .pc_only { display: none !important; }
    .board_list .td_subject { padding: 15px 0; font-size: 14px; }
    .btn_bo, .btn_b01 { padding: 6px 12px !important; font-size: 12px !important; }
}



/* =================================================================
   [12. 메인 레이아웃] 본문 + 사이드바 2단 분할
   ================================================================= */
.main-grid {
    display: grid;
    /* PC: 본문(유동적) + 사이드바(320px 고정) */
    grid-template-columns: 1fr 320px; 
    gap: 30px; /* 사이 간격 */
    align-items: start;
    width: 100%;
    margin-top: 30px;
}

/* 왼쪽: 본문 영역 */
.col-content { width: 100%; min-width: 0; }

/* 오른쪽: 사이드바 영역 */
.col-sidebar { width: 100%; display: flex; flex-direction: column; gap: 20px; }

/* 사이드바 위젯 박스 디자인 */
.side-widget {
    background: var(--b-card);
    border: 1px solid var(--b-border);
    border-radius: 12px;
    padding: 20px;
    color: var(--b-text-main);
}
.side-widget h3 { 
    font-size: 16px; font-weight: bold; color: #fff; 
    border-bottom: 1px solid var(--b-border); padding-bottom: 10px; margin-bottom: 15px; 
}

/* [반응형] 태블릿/모바일에서는 1단으로 변경 (사이드바 아래로 내림) */
@media (max-width: 1100px) {
    .main-grid { grid-template-columns: 1fr; }
    .col-sidebar { display: none; } /* 모바일에서 사이드바 숨김 (필요하면 display:flex로 변경) */
}