/* 기본 body 스타일 (reset.css와 중복 방지) */
body { 
    font-family: var(--font-family-base, 'Noto Sans KR', sans-serif); 
    font-size: var(--pc-font-size, 16px); 
    color: #222; 
    line-height: 1.5;
}


.top-bar { 
    background: #f5f5f5; 
    border-bottom: 1px solid #e0e0e0; 
    padding: 0px; 
    font-size: 13px; 
    width: 100%;
}
.top-bar-container { 
    max-width: var(--site-width); 
    margin: 0 auto; 
    display: flex; 
    justify-content: space-between; 
    padding: 0px; 
    width: 100%;
}
.top-bar-left { color: #666; display: flex; align-items: center;}
.top-bar-right { display: flex; align-items: center; gap: 12px; }
.top-bar-right a { 
    color: #666; 
    text-decoration: none; 
    padding: 4px 8px; 
    border-radius: 3px; 
}
.top-bar-right a:hover { color: #2c5aa0; background: #fff; }
.top-bar-right strong { color: #2c5aa0; font-weight: 600; }
.top-bar-right a i { margin-right: 4px; font-size: 12px; }
.admin-link { background: #e74c3c !important; color: white !important; font-weight: 500 !important; padding: 1px 8px !important; border-radius: 3px;}
.admin-link:hover { background: #c0392b !important; }

.main-header { 
    background: white; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); 
    position: sticky; 
    top: 0; 
    z-index: 9999; 
    width: 100%;
    border-bottom: 1px solid #ddd;
    transition: box-shadow 0.3s ease;
}

.main-header.scrolled {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-container { 
    max-width: var(--site-width); 
    margin: 0 auto; 
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    padding: 0 20px; 
    height: 70px;
    width: 100%;
}
.logo { padding: 4px 0 0px 0; }
.logo img { height: 55px; }
.main-nav { 
    margin-left: auto;
    position: relative;
    z-index: 10000;
}
.nav-list { 
    list-style: none; 
    display: flex;
    position: relative;
    z-index: 10000;
}
.nav-item { 
    position: relative;
    z-index: 10000;
}
.nav-link { 
    display: flex; 
    padding: 24px 30px; 
    color: #333; 
    text-decoration: none; 
    font-weight: 700 !important; 
    font-size: 19px; 
}
.nav-item:hover { background: rgba(74, 123, 167, 0.05); }

.sub-menu { 
    position: absolute; 
    top: 100%; 
    left: 0; 
    background: white; 
    min-width: 200px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); 
    opacity: 0; 
    visibility: hidden; 
    transform: translateY(-10px); 
    transition: all 0.3s; 
    z-index: 99999; 
    list-style: none; 
    border-top: 3px solid #4a7ba7;
}
.nav-item:hover > .sub-menu { 
    opacity: 1; 
    visibility: visible; 
    transform: translateY(0); 
}
.sub-menu-item { position: relative; }
.sub-menu-item i {font-size:13px !important;color:#999;margin-top:6px;}
.sub-menu-link { 
    display: flex; 
    justify-content: space-between; 
    padding: 8px 20px; 
    color: #333; 
    text-decoration: none; 
    border-bottom: 1px solid #f0f0f0; 
    font-size: 16px; 
}
.sub-menu-link:hover { background: #f5f5f5; color: #4a7ba7; }

.third-menu { 
    position: absolute; 
    top: 0; 
    left: 100%; 
    background: white; 
    min-width: 180px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); 
    opacity: 0; 
    visibility: hidden; 
    transform: translateX(-10px); 
    transition: all 0.3s; 
    list-style: none; 
    border-top: 3px solid #4a7ba7; 
    z-index: 999999;
}
.sub-menu-item:hover > .third-menu { 
    opacity: 1; 
    visibility: visible; 
    transform: translateX(0); 
}
.third-menu-link { 
    display: block; 
    padding: 6px 20px; 
    color: #333; 
    text-decoration: none; 
    border-bottom: 1px solid #f0f0f0; 
    font-size: 15px; 
}
.third-menu-link:hover { background: #f5f5f5; color: #4a7ba7; }

/* 모바일 헤더 스타일 */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    height: 60px;
}

.mobile-header .eng_link i {
    font-size: 20px;
    color: #444;
    margin-right:-12px;
}

.mobile-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    height: 100%;
    gap: 10px;
}

.mobile-logo {
    flex: 0 0 auto;
}

.mobile-logo img {
    height: 50px;
    margin-top:6px;
}

.eng_link {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn {
    flex: 0 0 auto;
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    padding: 8px;
}

/* 사이드 메뉴 스타일 - 오른쪽에서 나오도록 변경 */
.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-sidebar.open {
    right: 0;
}

.mobile-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #cce1f5;
    color: #333;
}

.mobile-sidebar-logo img {
    height: 35px;
}

.mobile-sidebar-close {
    background: none;
    border: none;
    color: #333;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

/* 모바일 사이드바 로그인 영역 */
.mobile-user-actions {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.mobile-user-actions .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.mobile-user-actions .user-info i {
    font-size: 24px;
    color: #4a7ba7;
}

.mobile-user-actions .user-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.mobile-user-actions .user-role {
    font-size: 13px;
    color: #666;
}

.mobile-user-actions .action-buttons {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.mobile-user-actions .action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
}

.mobile-user-actions .action-btn:hover {
    background: #4a7ba7;
    color: white;
    border-color: #4a7ba7;
}

.mobile-user-actions .action-btn i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.mobile-user-actions .action-btn.primary {
    background: #4a7ba7;
    color: white;
    border-color: #4a7ba7;
}

.mobile-user-actions .action-btn.primary:hover {
    background: #3d6688;
    border-color: #3d6688;
}

.mobile-sidebar-content {
    padding: 0;
}

.mobile-menu-item {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.2s;
}

.mobile-menu-link:hover {
    background: #f8f8f8;
    color: #4a7ba7;
}

.mobile-menu-link i {
    font-size: 14px;
    transition: transform 0.3s;
}

.mobile-menu-link.expanded i {
    transform: rotate(180deg);
}

.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8f9fa;
}

.mobile-submenu.open {
    max-height: 500px;
}

.mobile-submenu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px 8px 40px;
    color: #666;
    border-bottom: #ddd solid 1px;
    text-decoration: none;
    font-size: 15px;
    transition: background 0.2s;
}

.mobile-submenu-link:hover {
    background: #e9ecef;
    color: #4a7ba7;
}

.mobile-submenu-link i {
    font-size: 12px;
    transition: transform 0.3s;
}

.mobile-submenu-link.expanded i {
    transform: rotate(180deg);
}

.mobile-thirdmenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #e9ecef;
}

.mobile-thirdmenu.open {
    max-height: 300px;
}

.mobile-thirdmenu-link {
    display: block;
    padding:8px 20px 8px 60px;
    color: #666;
    border-bottom: #ccc solid 1px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.mobile-thirdmenu-link:hover {
    background: #dee2e6;
    color: #4a7ba7;
}

/* 사이드 메뉴 오버레이 */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.show {
    opacity: 1;
    visibility: visible;
}

.page-title-area {
    background: linear-gradient(to right, #5b9bd5, #4a90c9);
    padding: 20px;
    text-align: center;
    position: relative;
    z-index: 9997;
}

.page-title-area h1 {
    color: white;
    font-size: 36px;
    font-weight: 500;
    padding:12px 0 16px 0;
    margin: 0;
    z-index: 0 !important;
    letter-spacing: -0.5px;
}

.submenu-area {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    position: relative;
    z-index: 999;
}

.submenu-container {
    max-width: var(--site-width);
    margin: 0 auto;
    padding: 0px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.submenu-left {
    display: flex;
    align-items: center;
    gap: 0;
    order: 1;
}

.home-btn {
    width: 60px;
    height: 48px;
    border: none;
    border-left: 1px solid #d0d0d0;
    border-right: 1px solid #d0d0d0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 18px;
    text-decoration: none;
    transition: all 0.2s;
}

.home-btn:hover {
    color: #666;
}

.dropdown-menus {
    display: flex;
    gap: 0;
}

.dropdown-item {
    position: relative;
}

.dropdown-btn {
    padding: 0 25px 0 20px;
    border: none;
    border-right: 1px solid #d0d0d0;
    background: white;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 200px;
    height: 48px;
    text-align: left;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 500;
}

.dropdown-btn:hover {
    background: #f8f8f8;
}

.dropdown-btn i {
    font-size: 14px;
    color: #999;
}

/* 드롭다운 스타일은 style.css에서 통합 관리 */

.breadcrumb {
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
    order: 2;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #4a7ba7;
}

.breadcrumb .separator {
    color: #ccc;
    margin: 0 2px;
}

.breadcrumb .current {
    color: #4a7ba7;
}

.main-container { 
    max-width: var(--site-width); 
    margin: 0 auto; 
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* 홈페이지에서는 전체폭, 여백 없음 */
body.page-home .main-container {
    max-width: 100%;
    padding: 0;
    margin: 0;
}

/* 서브페이지에서는 템플릿 설정 너비 사용 */
body:not(.page-home) .main-container {
    max-width: var(--site-width) !important;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 서브페이지의 모든 컨테이너에 템플릿 설정 적용 */
body:not(.page-home) .container,
body:not(.page-home) * .container {
    max-width: var(--site-width) !important;
    margin: 0 auto !important;
}

/* 서브페이지 콘텐츠 영역 강제 적용 */
body:not(.page-home) .canvas-stage.stage-box,
body:not(.page-home) .main-section .container,
body:not(.page-home) .main-section.grid-section .container,
body:not(.page-home) .content-area,
body:not(.page-home) .page-content {
    max-width: var(--site-width) !important;
    margin: 0 auto !important;
}

/* 서브페이지 모든 가능한 컨테이너 요소 */
body:not(.page-home) .wrapper,
body:not(.page-home) .inner,
body:not(.page-home) .section,
body:not(.page-home) .content {
    max-width: var(--site-width) !important;
    margin: 0 auto !important;
}

body.page-home .main-footer {
    margin-top: 0;
}

.main-footer { 
    background: #1f2937; 
    color: #9ca3af; 
    padding: 22px 0px; 
    margin-top: 50px; 
    width: 100%;
}

.site-footer {
    padding: 22px 0px;
    margin-top: 40px;
    background:#33458a;
}

.footer-container { 
    max-width: var(--site-width); 
    margin: 0 auto; 
    padding: 0px; 
    width: 100%;
}
.footer-info {
    display: flex !important;
    gap: 6px;
    margin-bottom: 20px;
    margin-top: 10px;
    border-top: 1px solid #5a6db2;
    border-bottom: 1px solid #5a6db2;
}

.footer-links {margin-bottom: 12px;}
.footer-links a {color:#c0c9ec;}
.footer-links a:hover {color:#94a5e2;}
.footer-links .b_bar {padding:0 10px;font-size:12px;color: #6378c4;}

.footer-logo {
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    margin: 4px 12px 0 0;
}
.footer-company-info {
    display: flex !important;
    gap: 12px;
}
.footer-company-info p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.6;
}
.footer-company-info i {
    margin-right: 8px;
    color: #95a8ee;
}
.footer-bottom { 
    text-align: left; 
    padding-top: 0px; 
    font-size: 15px;
}

.footer-bottom .copyright {color:#98a6da !important;}

.footer-bottom a {color: #dbe3ff !important;}
.footer-bottom a:hover {color: #91a0d8 !important;}

/* PC/모바일 메뉴 표시 규칙 */
.desktop-menu {
    display: block;
}

.mobile-dropdown {
    display: none;
}

@media (max-width: 768px) {
    .top-bar, .main-header { display: none; }
    .mobile-header { display: block; }
    
    /* 모바일에서 메뉴 표시 규칙 변경 - 커뮤니티 메뉴 숨김 */
    .desktop-menu {
        display: none;
    }
    
    .mobile-dropdown {
        display: block;
    }
    
    /* 모바일에서 커뮤니티 메뉴 완전 숨김 */
    .dropdown-item:first-child {
        display: none !important;
    }
    
    /* 홈버튼 오른쪽으로 최종단 메뉴만 표시 */
    .submenu-left {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
    }
    
    .dropdown-menus {
        flex: 1 !important;
        display: flex !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .page-title-area {
        margin-top: 60px !important;
        padding: 12px 0;
        z-index: 0;
    }
    
    .page-title-area h1 {
        font-size: 32px;
    }
    
    .submenu-container {
        padding: 0px 12px;
        overflow-x: auto;
    }
    
    .breadcrumb {
        display: none !important;
    }
    

    
    /* 모바일 드롭다운 스타일은 style.css에서 통합 관리 */
    
    .home-btn {
        width: 60px;
        height: 48px;
        border: none;
        border-left: 1px solid #d0d0d0;
        border-right: 1px solid #d0d0d0;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #999;
        font-size: 18px;
        text-decoration: none;
        transition: all 0.2s;
    }
    
    .home-btn:hover {
        color: #666;
    }
    
    /* 모바일 드롭다운 스타일은 sublayout.css에서 관리 */
    
    .dropdown-btn {
        width: 100%;
        min-width: 200px;
        border-radius: 4px;
        border-right: 1px solid #d0d0d0;
    }
}

/* 모바일 전역 좌우 여백 12px 및 풀폭 규칙 */
@media (max-width: 768px) {
    .main-container,
    .container,
    body.page-home .main-container,
    body:not(.page-home) .main-container,
    body:not(.page-home) .container,
    body:not(.page-home) * .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    /* 페이지 타이틀 및 서브 영역 여백 최소화 */
    .page-title-area {
        padding-left: 12px;
        padding-right: 12px;
    }
    .submenu-area {
        padding-left: 0;
        padding-right: 0;
    }
}

.footer-link {
    width:100%;
    display: inline-block;
    white-space: nowrap;
    color: #fff;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    padding-bottom:8px;
    border-bottom: #3b626a solid 1px;
}

.footer-link .bar {
    color: #7d898d !important;
    margin:0px 8px;
    font-size: 12px;
    align-items: center;
}

.footer-link a {
    color: #fff;
    text-decoration: none;
}
.footer-link a:hover {color:#afeefc;}

.footer-info {
    display: inline-block;
    white-space: nowrap;
    margin: 6px 0;
    color: #b6bfc1;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
}

.footer-info b {
    color: #eee !important;
    margin-right:12px;
    font-size: 16px;
    font-weight: 600;
}

.footer-info .bar {
    color: #7d898d !important;
    margin:0px 8px;
    font-size: 12px;
    align-items: center;
}

.footer-copy {
    font-size: 13px !important;
    font-weight: 400;
    color: #95a5a6;
}

.m_only {display: none !important;}

@media (max-width: 768px) {

    .m_only {display: block !important;margin:-2px 0 -8px 0;padding:0px;}

    .footer-container { 
        max-width: 100%; 
        text-align: center;
        margin: 0 auto; 
        padding: 0px 12px; 
    }

    .footer-link {
        width:100%;
        text-align: center;
        color: #fff;
        font-size: 14px;
        font-weight: 400;
        line-height: 1.5;
        padding-bottom:8px;
        margin-bottom: 8px;
        border-bottom: #3b626a solid 1px;
    }

    .footer-link .bar {
        color: #7d898d !important;
        margin:0px 8px;
        font-size: 12px;
        align-items: center;
    }

    .footer-link a {
        color: #fff;
        text-decoration: none;
    }
    .footer-link a:hover {color:#afeefc;}

    .footer-info {
        display: block;
        white-space: wrap;        
        text-align: center;
        color: #b6bfc1;
        font-size: 14px;
        font-weight: 400;
        line-height: 1.5;
    }

    .footer-info b {
        color: #eee !important;
        font-size: 16px !important;
        font-weight: 600;
    }

    .footer-info .bar {
        color: #7d898d !important;
        margin:0px 8px;
        font-size: 12px;
        align-items: center;
    }

    .footer-copy {
        font-size: 13px !important;
        font-weight: 400;
        color: #95a5a6;
    }    
}        
