/* ===============================================
   WR 시스템 홈페이지 - 메인 스타일시트
   Design1.md & Design2.md 기반
   =============================================== */

/*
   NOTE: Google Fonts와 Font Awesome은 _Host.cshtml에서 로드됨
   중복 @import 제거로 성능 개선 (2025-12-23)
*/

/* =============================================
   CSS 변수 정의 (2025년 12월 현대화 버전)
   ============================================= */
:root {
    /* Primary Colors - 더 선명하고 현대적인 파란색 */
    --primary-color: #2563eb;      /* 선명한 파란색 - 신뢰감 */
    --primary-light: #60a5fa;      /* 밝은 파란색 */
    --primary-dark: #1d4ed8;       /* 어두운 파란색 (호버용) */
    --primary-darker: #1e40af;     /* 더 어두운 파란색 */

    /* Secondary Colors - 더 생동감 있는 색상 */
    --secondary-color: #22c55e;    /* 선명한 그린 - 성장, 혁신 */
    --secondary-light: #4ade80;    /* 밝은 그린 */
    --secondary-dark: #16a34a;     /* 어두운 그린 */

    /* Accent Colors - 따뜻한 강조 색상 */
    --accent-color: #f97316;       /* 선명한 오렌지 - 포인트 */
    --accent-light: #fb923c;       /* 밝은 오렌지 */
    --accent-dark: #ea580c;        /* 어두운 오렌지 */

    /* Neutral Colors - 더 세분화된 그레이 스케일 */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --gray-950: #030712;

    /* Background - 더 풍부한 배경 옵션 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --bg-gradient-soft: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);

    /* Shadow Colors */
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-color-md: rgba(0, 0, 0, 0.15);
    --shadow-color-lg: rgba(0, 0, 0, 0.2);
    --shadow-primary: rgba(37, 99, 235, 0.25);

    /* Border Colors */
    --border-color: #e5e7eb;
    --border-color-light: #f3f4f6;
    --border-color-dark: #d1d5db;

    /* Font System */
    --font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Font Sizes - 더 세분화된 스케일 */
    --text-xs: 0.75rem;     /* 12px */
    --text-sm: 0.875rem;    /* 14px */
    --text-base: 1rem;      /* 16px */
    --text-lg: 1.125rem;    /* 18px */
    --text-xl: 1.25rem;     /* 20px */
    --text-2xl: 1.5rem;     /* 24px */
    --text-3xl: 1.875rem;   /* 30px */
    --text-4xl: 2.25rem;    /* 36px */
    --text-5xl: 3rem;       /* 48px */
    --text-6xl: 3.75rem;    /* 60px */

    /* Font Weights */
    --font-light: 300;
    --font-regular: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-black: 900;

    /* Spacing Scale */
    --space-1: 0.25rem;     /* 4px */
    --space-2: 0.5rem;      /* 8px */
    --space-3: 0.75rem;     /* 12px */
    --space-4: 1rem;        /* 16px */
    --space-5: 1.25rem;     /* 20px */
    --space-6: 1.5rem;      /* 24px */
    --space-8: 2rem;        /* 32px */
    --space-10: 2.5rem;     /* 40px */
    --space-12: 3rem;       /* 48px */
    --space-16: 4rem;       /* 64px */
    --space-20: 5rem;       /* 80px */

    /* Border Radius */
    --radius-sm: 0.375rem;  /* 6px */
    --radius-md: 0.5rem;    /* 8px */
    --radius-lg: 0.75rem;   /* 12px */
    --radius-xl: 1rem;      /* 16px */
    --radius-2xl: 1.5rem;   /* 24px */
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    --transition-slower: 500ms ease;
}

/* =============================================
   전역 스타일
   ============================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-900);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    width: 100%;
    /* 다크 모드 비활성화 - 항상 라이트 모드로 고정 */
    color-scheme: light only;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

/* =============================================
   헤더 스타일 (2025년 12월 개선 버전)
   ============================================= */
.main-header {
    height: 70px;  /* 50px → 70px로 증가 - 가독성 및 접근성 향상 */
    background-color: #ffffff !important;
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999 !important;
    transition: transform var(--transition-slow), box-shadow var(--transition-base) !important;
    transform: translateY(0);
    will-change: transform;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    opacity: 1 !important;
    border-bottom: 1px solid var(--border-color-light);
}

/* 헤더 숨김 상태 */
.main-header.hidden {
    transform: translateY(-110%) !important;
}

/* body에 헤더 숨김 클래스가 있을 때 */
body.header-hidden .main-header {
    transform: translateY(-110%) !important;
}

/* 헤더가 숨겨졌을 때 콘텐츠 조정 */
body.header-hidden .main-content {
    padding-top: 0 !important;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 100%;
}

/* 로고 스타일 - 2025년 12월 개선 */
.logo-wrapper {
    display: flex;
    align-items: center;
}

.company-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;  /* 크기 증가 */
    font-weight: 700;
    color: var(--primary-color);
    transition: transform var(--transition-base), color var(--transition-base);
    letter-spacing: -0.02em;
}

.company-logo:hover {
    transform: translateY(-2px);
    color: var(--primary-dark);
}

.logo-icon {
    font-size: 1.75rem;  /* 크기 증가 */
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-icon-img {
    height: 32px;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
}

.logo-text {
    font-weight: var(--font-bold);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 네비게이션 메뉴 스타일 - 2025년 12월 개선 */
.navigation {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    color: var(--gray-600);
    font-weight: var(--font-medium);
    font-size: 0.95rem;
    transition: color var(--transition-base), background-color var(--transition-base);
    position: relative;
    border-radius: var(--radius-md);
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: var(--bg-secondary);
}

/* 활성 링크 스타일 - 강화 */
.nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(37, 99, 235, 0.1);
    font-weight: var(--font-semibold);
    position: relative;
    border-radius: 8px;
}

/* 활성 링크 하단 표시기 */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 3px;
}

/* 활성 링크 아이콘 강조 */
.nav-link.active i {
    color: var(--primary-color);
    transform: scale(1.1);
}

.dropdown-arrow {
    font-size: 0.75rem;
    margin-left: 5px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 드롭다운 열릴 때 화살표 회전 */
.dropdown-container:hover .dropdown-arrow,
.dropdown-menu.show + .dropdown-arrow,
.nav-link[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* 드롭다운 메뉴 스타일 */
.dropdown-container {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: -20px;
    background: white;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 12px 0;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.95);
    transform-origin: top center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-menu.show,
.dropdown-container:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* 드롭다운 아이템 순차 애니메이션 */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--gray-700);
    font-size: var(--text-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateX(-10px);
}

.dropdown-menu.show .dropdown-item,
.dropdown-container:hover .dropdown-item {
    opacity: 1;
    transform: translateX(0);
}

.dropdown-menu.show .dropdown-item:nth-child(1),
.dropdown-container:hover .dropdown-item:nth-child(1) {
    transition-delay: 0.05s;
}

.dropdown-menu.show .dropdown-item:nth-child(2),
.dropdown-container:hover .dropdown-item:nth-child(2) {
    transition-delay: 0.1s;
}

.dropdown-menu.show .dropdown-item:nth-child(3),
.dropdown-container:hover .dropdown-item:nth-child(3) {
    transition-delay: 0.15s;
}

.dropdown-item:hover {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.04));
    color: var(--primary-color);
    padding-left: 28px;
}

.dropdown-item i {
    color: var(--primary-light);
    width: 20px;
    text-align: center;
    transition: transform 0.2s ease, color 0.2s ease;
}

.dropdown-item:hover i {
    transform: scale(1.15);
    color: var(--primary-color);
}

/* 모바일 메뉴 토글 버튼 */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-700);
    cursor: pointer;
    padding: 10px;
    transition: color 0.3s;
}

.mobile-menu-toggle:hover {
    color: var(--primary-color);
}

/* 모바일 메뉴 - 2025년 12월 개선 */
.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;  /* 헤더 높이에 맞춤 */
    left: -100%;
    width: 85%;
    max-width: 320px;
    height: calc(100vh - 70px);
    background-color: #ffffff !important;
    background: #ffffff !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    transition: left var(--transition-slow);
    z-index: 999;
    overflow-y: auto;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    opacity: 1 !important;
    border-right: 1px solid var(--border-color);
}

.mobile-menu.active {
    left: 0;
}

.mobile-nav-list {
    list-style: none;
    padding: 20px 0;
    margin: 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    color: var(--gray-700);
    font-weight: var(--font-medium);
    transition: all 0.3s;
    border-bottom: 1px solid var(--gray-100);
}

.mobile-nav-link:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
    padding-left: 25px;
}

.mobile-dropdown-arrow {
    margin-left: auto;
    transition: transform 0.3s;
}

.mobile-dropdown-arrow.rotated {
    transform: rotate(180deg);
}

.mobile-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #ffffff !important;
    background: #ffffff !important;
    /* 투명도 관련 속성 제거 */
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    opacity: 1 !important;
}

.mobile-dropdown-content.show {
    max-height: 300px;
    background-color: #ffffff !important;
    background: #ffffff !important;
}

.mobile-dropdown-item {
    display: block;
    padding: 12px 20px 12px 40px;
    color: var(--gray-600);
    font-size: var(--text-sm);
    border-bottom: 1px solid var(--gray-50);
    transition: all 0.3s;
}

.mobile-dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
    padding-left: 45px;
}

/* =============================================
   반응형 디자인 - 2025년 12월 개선
   ============================================= */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .navigation {
        display: none;
    }

    .mobile-menu {
        display: block;
    }

    .header-container {
        padding: 0 16px;
    }

    .company-logo {
        font-size: 1.25rem;
    }

    .logo-icon {
        font-size: 1.5rem;
    }

    .logo-icon-img {
        height: 28px;
    }

    .main-header {
        height: 60px;
    }

    .mobile-menu {
        top: 60px;
        height: calc(100vh - 60px);
    }
}

@media (max-width: 640px) {
    .main-header {
        height: 56px;
    }

    .mobile-menu {
        top: 56px;
        height: calc(100vh - 56px);
    }

    .main-content {
        padding-top: 0;
    }

    .main-content.with-header-spacing {
        padding-top: 56px;
    }

    .company-logo {
        font-size: 1.15rem;
    }

    .logo-icon {
        font-size: 1.35rem;
    }

    .logo-icon-img {
        height: 24px;
    }

    .logo-text {
        font-size: 1rem;
    }
}

/* =============================================
   유틸리티 클래스
   ============================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

.mt-8 {
    margin-top: 2rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* =============================================
   애니메이션 - 2025년 12월 최적화 버전
   ============================================= */

/* 기본 애니메이션 - GPU 가속 최적화 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translate3d(-30px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translate3d(30px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale3d(0.95, 0.95, 1);
    }
    to {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

/* 애니메이션 유틸리티 클래스 */
.animate-fadeInUp {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-fadeIn {
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-slideInLeft {
    animation: slideInLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-slideInRight {
    animation: slideInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-scaleIn {
    animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 애니메이션 지연 유틸리티 */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* 저사양 기기에서 애니메이션 감소 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 포커스 스타일 (접근성) */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to content 링크 (접근성) */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}