/* ===================================
   DR소프트 - 헤더 스타일
   style-header.css
   =================================== */

/* 헤더 기본 스타일 */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.main-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.15);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    padding: 0 20px;
}

/* 로고 */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 800;
    color: #1a1a1a;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: translateY(-2px);
    color: #667eea;
}

.logo img {
    height: 45px;
    width: auto;
}

/* 메인 네비게이션 */
.main-nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
    margin: 0;
    padding: 0;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: #4a5568;
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu > li > a:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.nav-menu > li > a.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.12);
    font-weight: 600;
}

/* 드롭다운 메뉴 */
.has-dropdown > a::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 12px;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.has-dropdown:hover > a::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 8px;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    list-style: none;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #4a5568;
    font-size: 14px;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.dropdown-menu a:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
    transform: translateX(5px);
}

.dropdown-menu a i {
    width: 20px;
    text-align: center;
    color: #a0aec0;
}

/* 3차 메뉴 (서브메뉴) 스타일 */
.has-submenu {
    position: relative;
}

.has-submenu > a::after {
    content: '\f105';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 12px;
    margin-left: auto;
    transition: transform 0.3s ease;
}

.has-submenu:hover > a::after {
    transform: translateX(5px);
}

.submenu {
    position: absolute;
    top: 0;
    left: 100%;
    min-width: 200px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 8px;
    margin-left: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    list-style: none;
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.submenu li {
    margin: 0;
}

.submenu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #4a5568;
    font-size: 13px;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.submenu a:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
    transform: translateX(3px);
}

.submenu a i {
    width: 16px;
    text-align: center;
    color: #a0aec0;
    font-size: 12px;
}

/* CTA 버튼 */
.header-cta .btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.header-cta .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.header-cta .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.header-cta .btn i {
    font-size: 16px;
}

/* 모바일 메뉴 토글 */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #4a5568;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* 모바일 메뉴 */
@media (max-width: 991px) {
    .header-container {
        padding: 0 15px;
    }
    
    .main-nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: white;
        flex-direction: column;
        padding: 20px;
        gap: 20px;
        overflow-y: auto;
        transition: left 0.3s ease;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 5px;
    }
    
    .nav-menu > li {
        width: 100%;
    }
    
    .nav-menu > li > a {
        width: 100%;
        padding: 15px 20px;
        font-size: 16px;
    }
    
    .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        background: rgba(248, 250, 252, 0.8);
        margin-top: 5px;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }
    
    .has-dropdown.active .dropdown-menu {
        display: block;
    }
    
    .dropdown-menu a {
        padding-left: 40px;
    }
    
    /* 모바일 3차 메뉴 */
    .submenu {
        position: static;
        width: 100%;
        box-shadow: none;
        background: rgba(248, 250, 252, 0.6);
        margin-left: 0;
        margin-top: 5px;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }
    
    .has-submenu.active .submenu {
        display: block;
    }
    
    .submenu a {
        padding-left: 60px;
        font-size: 14px;
    }
    
    .has-submenu > a::after {
        content: '\f107';
        position: absolute;
        right: 20px;
        transition: transform 0.3s ease;
    }
    
    .has-submenu.active > a::after {
        transform: rotate(180deg);
    }
    
    .header-cta {
        width: 100%;
    }
    
    .header-cta .btn {
        width: 100%;
        justify-content: center;
        padding: 15px;
        font-size: 16px;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
}

/* 애니메이션 */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 헤더 스크롤 효과 */
body {
    padding-top: 80px;
}

/* 스크롤 진행률 표시기 */
.scroll-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0;
    transition: width 0.3s ease;
}