/* 기본 스타일 - 외주용역 전문 회사 */
:root {
    --primary-color: #0056b3;
    --secondary-color: #003d82;
    --accent-color: #00a8e8;
    --success-color: #28a745;
    --text-color: #2c3e50;
    --text-secondary: #6c757d;
    --light-gray: #f8f9fa;
    --border-color: #dee2e6;
    --white: #ffffff;
    --dark-bg: #1a2332;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.7;
    background-color: #ffffff;
    font-size: 16px;
    letter-spacing: -0.3px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* 네비게이션 스타일 - 전문성 강조 */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 86, 179, 0.1);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color);
}

.navbar-nav .nav-link {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    margin: 0 5px;
    position: relative;
}

.navbar-nav .nav-link:hover, 
.navbar-nav .nav-link.active {
    color: var(--primary-color);
}

.navbar-nav .nav-link.active:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

/* 드롭다운 메뉴 호버 스타일 - 전체 헤더 너비 사용 */
.navbar {
    position: sticky;
}

.navbar .nav-item.dropdown {
    position: static;
}

.navbar .nav-item.dropdown .dropdown-menu {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
    transform: translateY(2px);
    border: none;
    border-top: 1px solid rgba(0, 86, 179, 0.08);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08), 0 4px 8px rgba(15, 23, 42, 0.04);
    padding: 28px 32px;
    min-height: 132px;
    width: 100%;
    margin-top: 0;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
    position: absolute;
    z-index: 1030;
}

/* hover dead-zone 방지: nav-link와 드롭다운 사이를 잇는 투명 브릿지
   visibility: hidden일 때는 자동으로 비활성화되므로 닫힌 상태에서 영향 없음 */
.navbar .nav-item.dropdown .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
}

.navbar .nav-item.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s;
}

.navbar .dropdown-menu .dropdown-item {
    padding: 12px 28px;
    font-weight: 500;
    font-size: 0.95rem;
    color: #4b5563;
    transition: color 0.15s ease, background 0.15s ease;
    white-space: nowrap;
    border-radius: 6px;
    background: transparent;
    width: auto;
}

.navbar .dropdown-menu .dropdown-item:hover {
    background: #f3f6fb;
    color: var(--primary-color);
}

.navbar .dropdown-menu .dropdown-item.active {
    background: transparent;
    color: var(--primary-color);
    font-weight: 600;
}

/* 세로 구분선 (legacy - mega-dropdown에선 사용 안함) */
.navbar .dropdown-menu .dropdown-divider-vertical {
    width: 1px;
    height: 22px;
    background: #e5e7eb;
    margin: 0;
    padding: 0;
    align-self: center;
    flex-shrink: 0;
}

/* ===== 메가 드롭다운 - 에디토리얼 미니멀 ===== */
.navbar .dropdown-menu.mega-dropdown {
    align-items: stretch;
    justify-content: center;
    gap: 64px;
    background: #ffffff;
    padding: 36px 48px;
    min-height: 156px;
}

.navbar .dropdown-menu.mega-dropdown > li {
    list-style: none;
    display: flex;
    align-items: stretch;
}

.navbar .dropdown-menu.mega-dropdown .mega-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 0 4px 20px;
    width: 320px;
    background: transparent;
    border: none;
    border-left: 1px solid #e5e7eb;
    border-radius: 0;
    transition: border-color 0.25s ease, padding-left 0.25s ease;
    position: relative;
    overflow: visible;
    white-space: normal;
}

.navbar .dropdown-menu.mega-dropdown .mega-item::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.navbar .dropdown-menu.mega-dropdown .mega-item:hover {
    background: transparent;
    transform: none;
    box-shadow: none;
    border-left-color: transparent;
    padding-left: 22px;
}

.navbar .dropdown-menu.mega-dropdown .mega-item:hover::before,
.navbar .dropdown-menu.mega-dropdown .mega-item.active::before {
    transform: scaleY(1);
}

.navbar .dropdown-menu.mega-dropdown .mega-item.active {
    border-left-color: transparent;
    padding-left: 22px;
}

.navbar .dropdown-menu.mega-dropdown .mega-item-eyebrow {
    font-size: 0.7rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    transition: color 0.2s ease;
    margin-bottom: 2px;
}

.navbar .dropdown-menu.mega-dropdown .mega-item:hover .mega-item-eyebrow,
.navbar .dropdown-menu.mega-dropdown .mega-item.active .mega-item-eyebrow {
    color: var(--primary-color);
}

.navbar .dropdown-menu.mega-dropdown .mega-item-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
    letter-spacing: -0.01em;
    transition: color 0.2s ease;
}

.navbar .dropdown-menu.mega-dropdown .mega-item:hover .mega-item-title,
.navbar .dropdown-menu.mega-dropdown .mega-item.active .mega-item-title {
    color: var(--primary-color);
}

.navbar .dropdown-menu.mega-dropdown .mega-item-desc {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.55;
    white-space: normal;
    font-weight: 400;
    margin-top: 2px;
}

/* 드롭다운 화살표 */
.navbar .nav-item.dropdown .dropdown-toggle::after {
    transition: transform 0.2s ease;
    font-size: 0.6rem;
    margin-left: 5px;
    vertical-align: middle;
}

.navbar .nav-item.dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

/* 관리자 드롭다운 - 우측 정렬 컴팩트 스타일 (전체 너비 적용 제외) */
.navbar .dropdown-menu-end {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    right: 0;
    left: auto;
    width: auto;
    min-width: 220px;
    min-height: auto;
    padding: 8px 0;
    background: #fff;
    border-radius: 6px;
    border-top: 1px solid #e5e7eb;
}

.navbar .dropdown-menu-end .dropdown-item {
    padding: 9px 18px;
    border-radius: 0;
    font-weight: 400;
}

.navbar .dropdown-menu-end .dropdown-divider {
    margin: 6px 0;
    border-color: #e5e7eb;
}

.navbar .dropdown-menu-end .dropdown-header {
    padding: 8px 16px 4px;
    font-size: 0.78rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* 버튼 스타일 */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-emphasis {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-emphasis:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 76, 174, 0.3);
}

.btn-emphasis-icon {
    margin-right: 10px;
    font-size: 1.2em;
}

.btn-emphasis-content {
    font-weight: 600;
}

/* 푸터 스타일 - B2B 외주용역 스타일 */
footer {
    background: linear-gradient(135deg, #1a2332 0%, #2c3e50 100%);
    color: #ecf0f1;
    padding: 60px 0 20px;
    margin-top: 80px;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
}

footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 20px;
}

footer .footer-links a {
    color: #bdc3c7;
    display: block;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

footer .footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

footer .footer-contact p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

footer .footer-contact i {
    margin-right: 10px;
    color: var(--accent-color);
}

footer .copyright {
    border-top: 1px solid rgba(236, 240, 241, 0.1);
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #bdc3c7;
}

/* 섹션 스타일 - 외주용역 전문 */
.section {
    padding: 100px 0;
}

.section-title {
    margin-bottom: 60px;
    text-align: center;
    position: relative;
}

.section-title h2 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.section-title p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 25px auto 0;
    line-height: 1.8;
}

/* 페이지네이션 스타일 */
.pagination {
    margin-top: 30px;
}

.pagination .page-item .page-link {
    border-radius: 8px;
    margin: 0 5px;
    color: var(--primary-color);
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
    padding: 10px 16px;
    font-weight: 500;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(30, 76, 174, 0.3);
}

.pagination .page-item .page-link:hover {
    background-color: #e9ecef;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    border-color: #dee2e6;
    background-color: #f8f9fa;
    cursor: not-allowed;
}

/* 제품/서비스 섹션 스타일 */
.products-section {
    padding: 80px 0;
}

.category-tabs {
    background-color: var(--light-gray);
    padding: 30px 0;
    margin-bottom: 40px;
}

.category-tab {
    text-align: center;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px;
}

.category-tab:hover,
.category-tab.active {
    background-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.category-tab.active {
    border: 2px solid var(--primary-color);
}

.category-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.category-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.category-count {
    font-size: 0.9rem;
}

.product-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    margin-bottom: 30px;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.product-img {
    border-radius: 15px 15px 0 0;
    height: 200px;
    object-fit: cover;
}

.product-body {
    padding: 20px;
}

.product-category {
    display: inline-block;
    background-color: var(--light-gray);
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.product-title {
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-color);
}

.product-desc {
    color: #6c757d;
    margin-bottom: 20px;
    min-height: 60px;
}

.product-features {
    margin-bottom: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.feature-icon {
    color: var(--primary-color);
    margin-right: 10px;
}

.feature-text {
    color: var(--text-color);
}

.product-price {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.price-period {
    font-size: 0.9rem;
    color: #6c757d;
}

.product-footer {
    margin-top: 20px;
}

.btn-details {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-details:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

/* 반응형 스타일 */
@media (max-width: 991.98px) {
    .navbar .nav-item.dropdown {
        position: relative;
    }

    .navbar .nav-item.dropdown .dropdown-menu {
        display: none;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        position: static;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        margin-top: 0;
        padding: 0;
        min-height: auto;
        width: 100%;
        background: #f8f9fa;
    }

    .navbar .nav-item.dropdown .dropdown-menu.show {
        display: flex;
    }

    .navbar .dropdown-menu .dropdown-item {
        padding: 10px 24px;
        border-radius: 0;
    }

    .navbar .dropdown-menu .dropdown-divider-vertical {
        display: none;
    }

    /* 메가 드롭다운 모바일 - 세로 정렬, 미니멀 유지 */
    .navbar .dropdown-menu.mega-dropdown {
        gap: 4px;
        padding: 8px 16px 12px;
        background: #f8f9fa;
        min-height: auto;
    }

    .navbar .dropdown-menu.mega-dropdown .mega-item {
        width: 100%;
        padding: 12px 0 12px 14px;
        border-left: 1px solid #e5e7eb;
    }

    .navbar .dropdown-menu.mega-dropdown .mega-item:hover {
        padding-left: 16px;
    }

    .navbar .dropdown-menu.mega-dropdown .mega-item-title {
        font-size: 1.05rem;
    }

    .navbar .dropdown-menu.mega-dropdown .mega-item-desc {
        font-size: 0.8rem;
    }
}

@media (max-width: 767.98px) {
    .navbar-nav .nav-link.active:after {
        display: none;
    }

    .section {
        padding: 60px 0;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .products-section {
        padding: 60px 0;
    }

    .category-tab {
        margin-bottom: 15px;
    }

    .product-img {
        height: 180px;
    }
}

/* 공용 로딩 오버레이 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay.show {
    display: flex;
}

.loading-content {
    text-align: center;
    color: white;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 