/* ============================================
   이음컴퍼니 자산관리센터 통합 스타일시트
   ============================================ */

/* 기본 설정 */
:root {
    --primary-color: #2C3E50;
    --secondary-color: #00A884;
    --accent-color: #F4C542;
    --accent-hover: #F2784B;
    --light-bg: #F7F9FA;
    --section-bg: #F0F2F5;
    --text-primary: #333;
    --text-secondary: #666;
    --text-light: #999;
    --white: #ffffff;
    --border-light: rgba(0,0,0,0.05);
    --shadow-light: 0 4px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 6px 15px rgba(0,0,0,0.15);
    --shadow-heavy: 0 8px 20px rgba(0,0,0,0.12);
    --border-radius: 10px;
    --border-radius-large: 20px;
    --transition: all 0.3s ease;
    --max-width: 1200px;
}

/* 기본 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

html {
    height: -webkit-fill-available;
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--light-bg);
    min-height: 100vh;
    min-height: -webkit-fill-available;
    padding-top: env(safe-area-inset-top);
    overflow-x: hidden;
}

/* ============================================
   헤더 스타일
   ============================================ */
.header {
    background-color: rgba(255, 255, 255, 0.95);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 997;
    padding: 20px 30px;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header.scrolled {
    background-color: var(--white);
    box-shadow: var(--shadow-light);
    padding: 15px 30px;
    border-bottom: none;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* 로고 */
.logo {
    display: flex;
    align-items: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    flex: 0 0 auto;
    margin-right: 20px;
}

.logo:hover {
    opacity: 0.9;
}

.logo img, .logo svg {
    height: 60px;
    width: auto;
    margin-right: 18px;
    transition: var(--transition);
    position: relative;
    top: -2px;
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

/* 메인 메뉴 */
.main-menu {
    display: flex;
    gap: 40px;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
}

.main-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 16px;
    transition: var(--transition);
    position: relative;
}

.main-menu a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    bottom: -5px;
    left: 0;
    transition: width 0.3s;
}

.main-menu a:hover:after {
    width: 100%;
}

/* 인증/상담 메뉴 */
.auth-menu {
    display: flex;
    gap: 20px;
    align-items: center;
    flex: 0 0 auto;
    margin-left: 20px;
}

.auth-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 16px;
    transition: var(--transition);
}

.auth-menu a.consultation-btn {
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: -0.5px;
    font-size: 15px;
    box-shadow: var(--shadow-light);
    white-space: nowrap;
}

.auth-menu a.consultation-btn:hover {
    background-color: var(--accent-hover);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.auth-menu a.login-btn {
    color: var(--primary-color);
    padding: 10px 0;
    font-weight: 500;
    font-size: 16px;
    white-space: nowrap;
}

.auth-menu a.login-btn:hover {
    color: var(--secondary-color);
}

/* 드롭다운 메뉴 스타일 */
.dropdown {
    position: relative;
    display: inline-block;
    padding: 10px 15px;
    margin: -10px 0;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 200px;
    box-shadow: var(--shadow-heavy);
    border-radius: var(--border-radius);
    padding: 10px 0;
    z-index: 996;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
}

.dropdown-content::before {
    content: '';
    position: absolute;
    top: -25px;
    left: -20px;
    right: -20px;
    height: 25px;
    background: transparent;
}

.dropdown-content a {
    color: var(--text-primary);
    padding: 14px 28px;
    text-decoration: none;
    display: block;
    font-size: 15px;
    text-align: left;
    transition: var(--transition);
    white-space: nowrap;
}

.dropdown-content a:after {
    display: none;
}

.dropdown-content a:hover {
    background-color: #f8f8f8;
    color: var(--secondary-color);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-btn {
    padding: 10px 5px;
}

.dropdown-btn:after {
    content: '▼';
    font-size: 10px;
    margin-left: 5px;
    position: relative;
    top: -2px;
}

/* 사용자 드롭다운 메뉴 스타일 */
.user-wrapper {
    position: relative;
    display: inline-block;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--white);
    min-width: 150px;
    box-shadow: var(--shadow-heavy);
    border-radius: var(--border-radius);
    padding: 10px 0;
    z-index: 997;
    margin-top: 10px;
}

.user-dropdown a {
    position: relative;
    display: block;
    text-align: left;
    padding: 12px 20px;
    color: var(--text-primary);
    font-size: 15px;
    border: none;
    transition: var(--transition);
}

.user-dropdown a:hover {
    background-color: #f8f8f8;
    color: var(--secondary-color);
}

.user-wrapper:hover .user-dropdown,
.user-dropdown:hover {
    display: block;
}

/* 모바일 메뉴 버튼 */
.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-primary);
    padding: 10px;
    z-index: 1001;
    transition: var(--transition);
}

.mobile-menu-button:hover {
    color: var(--secondary-color);
}

/* 사이드바 메뉴 - 기본적으로 숨김 */
.nav-links {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    max-width: 80vw;
    height: 100vh;
    background-color: var(--white);
    padding: calc(80px + env(safe-area-inset-top, 0)) 0 40px;
    overflow-y: auto;
    transition: all 0.3s ease-in-out;
    z-index: 1001;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    visibility: hidden;
    opacity: 0;
    transform: translateX(100%);
}

.nav-links.active {
    right: 0;
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
}

/* 사이드바 메뉴 기본 스타일 */
.nav-links a {
    display: block;
    padding: 20px 30px;
    font-size: 18px;
    font-weight: 500;
    border-bottom: 1px solid #eee;
    text-align: left;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.nav-links a:hover {
    background-color: #f8f8f8;
    color: var(--secondary-color);
}

.nav-links .dropdown {
    width: 100%;
    padding: 0;
    margin: 0;
}

.nav-links .dropdown-btn {
    width: 100%;
    padding: 20px 30px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 18px;
    transition: var(--transition);
}

.nav-links .dropdown-btn:hover {
    background-color: #f8f8f8;
    color: var(--secondary-color);
}

.nav-links .dropdown-content {
    position: static;
    width: 100%;
    box-shadow: none;
    border-radius: 0;
    transform: none;
    margin: 0;
    padding: 0;
    left: 0;
    background-color: #f8f8f8;
}

.nav-links .dropdown.active .dropdown-content {
    display: block;
}

.nav-links .dropdown-content a {
    padding: 15px 50px;
    background-color: #f8f8f8;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    text-align: left;
    transition: var(--transition);
}

.nav-links .dropdown-content a:hover {
    background-color: #f0f0f0;
    color: var(--secondary-color);
}

.nav-links .consultation-btn {
    margin: 20px 30px;
    padding: 15px 20px !important;
    border-radius: 8px;
    background-color: var(--accent-color);
    color: var(--primary-color);
    text-align: center !important;
    font-weight: 600;
    border-bottom: none !important;
}

.nav-links .consultation-btn:hover {
    background-color: var(--accent-hover) !important;
    color: var(--white) !important;
}

/* 사용자 관련 스타일 */
.nav-links .user-wrapper {
    width: 100%;
    order: -1;
    margin-bottom: 10px;
    position: relative;
}

.nav-links .user-btn {
    display: block;
    width: 100%;
    padding: 20px 30px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 18px;
    transition: var(--transition);
}

.nav-links .user-btn:hover {
    background-color: #f8f8f8;
    color: var(--secondary-color);
}

.nav-links .user-dropdown {
    position: static;
    width: 100%;
    box-shadow: none;
    border-radius: 0;
    margin: 0;
    padding: 0;
    transform: none;
    left: auto;
    display: none;
    background-color: #f8f8f8;
}

.nav-links .user-dropdown a {
    background-color: #f8f8f8;
    text-align: left;
    padding: 15px 50px;
    font-size: 16px;
    color: #555;
    border-bottom: 1px solid #eee;
    transition: var(--transition);
}

.nav-links .user-dropdown a:hover {
    background-color: #f0f0f0;
    color: var(--secondary-color);
}

.nav-links .user-wrapper:hover .user-dropdown,
.nav-links .user-dropdown:hover,
.nav-links .user-wrapper.active .user-dropdown {
    display: block;
}

/* 메뉴 오버레이 */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    visibility: hidden;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* ============================================
   페이지 헤더 공통 스타일
   ============================================ */
.page-header {
    padding: 120px 20px;
    background-color: var(--primary-color);
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495E 100%);
    z-index: 1;
}

.page-header-content {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-size: 52px;
    margin-bottom: 30px;
    font-weight: 800;
    color: var(--white);
    text-align: center;
    line-height: 1.3;
}

.page-header p {
    font-size: 22px;
    color: #A3E4D7;
    margin-bottom: 12px;
    line-height: 1.6;
    text-align: center;
}

/* CTA 버튼 */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 25px;
    background-color: var(--accent-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    margin-top: 25px;
    border: none;
    box-shadow: var(--shadow-light);
}

.cta-button:hover {
    background-color: var(--accent-hover);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.cta-button svg {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.cta-button:hover svg {
    transform: translateX(3px);
}

/* ============================================
   섹션 공통 스타일
   ============================================ */
.section {
    padding: 120px 20px;
}

.section-light {
    background-color: var(--white);
}

.section-gray {
    background-color: var(--section-bg);
}

.section-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.3;
    text-align: center;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
    text-align: center;
    margin-bottom: 60px;
}

/* ============================================
   카드 컴포넌트
   ============================================ */
.card {
    background: var(--white);
    border-radius: var(--border-radius-large);
    padding: 40px;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.card-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #d1f5ee 0%, #b3ede1 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    font-size: 22px;
    font-weight: 700;
    color: var(--secondary-color);
}

.card-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 18px;
}

.card-description {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.7;
    text-align: center;
}

/* ============================================
   서비스 섹션 스타일
   ============================================ */
.service-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: flex-start;
}

.service-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.service-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.3;
    margin-top: 0;
}

.service-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

.service-details {
    border-radius: var(--border-radius-large);
    padding: 40px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 280px;
}

.service-details.teal {
    background: linear-gradient(135deg, #e0f7f5 0%, #b3ede1 100%);
}

.service-details.orange {
    background: linear-gradient(135deg, #fff2e6 0%, #ffe0b3 100%);
}

.service-details.blue {
    background: linear-gradient(135deg, #f0f3ff 0%, #c7d4ff 100%);
}

.service-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.service-item:last-child {
    margin-bottom: 0;
}

.service-bullet {
    width: 6px;
    height: 6px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}

.service-item span {
    font-size: 16px;
    color: var(--primary-color);
}

.service-link {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    width: fit-content;
}

.service-link.teal {
    background: linear-gradient(135deg, #e0f7f5 0%, #b3ede1 100%);
    color: var(--primary-color);
    border: 1px solid #b3ede1;
}

.service-link.teal:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(179, 237, 225, 0.4);
}

.service-link.orange {
    background: linear-gradient(135deg, #fff2e6 0%, #ffe0b3 100%);
    color: var(--primary-color);
    border: 1px solid #ffe0b3;
}

.service-link.orange:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 224, 179, 0.4);
}

.service-link.blue {
    background: linear-gradient(135deg, #f0f3ff 0%, #c7d4ff 100%);
    color: var(--primary-color);
    border: 1px solid #c7d4ff;
}

.service-link.blue:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(199, 212, 255, 0.4);
}

.detail-link {
    display: inline-block;
    margin-top: 56px;
    padding: 16px 38px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495E 100%);
    color: var(--white);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 700;
    font-size: 18px;
    transition: var(--transition);
    border: none;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.13);
}

.detail-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.18);
}

/* ============================================
   푸터 스타일
   ============================================ */
.footer {
    background-color: var(--text-primary);
    color: var(--white);
    padding: 60px 20px;
    margin-top: auto;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.company-info {
    margin-bottom: 20px;
}

.company-info p {
    margin: 5px 0;
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

/* ============================================
   반응형 디자인
   ============================================ */

/* 태블릿 */
@media (max-width: 1024px) {
    .logo-text {
        font-size: 18px;
    }
    
    .main-menu {
        gap: 20px;
    }
    
    .auth-menu {
        gap: 10px;
    }
    
    .auth-menu a.consultation-btn {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .section {
        padding: 80px 20px;
    }
    
    .service-grid {
        gap: 60px;
    }
}

/* 모바일 */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    .header {
        padding: 12px 20px;
    }
    
    .header.scrolled {
        padding: 10px 20px;
    }
    
    .nav {
        flex-wrap: wrap;
    }
    
    .logo {
        flex: 1;
        margin-right: 0;
    }
    
    .logo img, .logo svg {
        height: 45px;
        margin-right: 10px;
    }
    
    .main-menu, .auth-menu {
        display: none !important;
    }
    
    .mobile-menu-button {
        display: block;
        position: relative;
        z-index: 1002;
    }
    
    .page-header {
        height: auto;
        min-height: 30vh;
        padding: 80px 20px;
        margin-top: 80px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .page-header-content {
        width: 100%;
        max-width: 100%;
        padding: 0 15px;
    }
    
    .page-header h1 {
        font-size: 32px;
        margin-bottom: 15px;
        line-height: 1.3;
    }
    
    .page-header p {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .section {
        padding: 60px 20px;
    }
    
    .section-title {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .section-subtitle {
        font-size: 16px;
        margin-bottom: 40px;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-top: 30px;
    }
    
    .service-grid {
        display: flex;
        flex-direction: column;
        gap: 40px;
    }
    
    .service-content {
        order: 1;
    }
    
    .service-details {
        order: 2;
        margin: 30px 0;
        min-height: auto;
        padding: 30px;
    }
    
    .service-title {
        font-size: 28px;
        margin-bottom: 20px;
    }
    
    .service-description {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .service-content .service-link {
        order: 3;
        align-self: flex-start;
        margin-top: 20px;
    }
    
    .footer {
        padding: 40px 20px;
    }
    
    .footer-content {
        gap: 20px;
    }
    
    .company-info p {
        font-size: 13px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

/* 소형 모바일 */
@media (max-width: 480px) {
    .page-header {
        min-height: 70vh;
    }
    
    .page-header-content {
        padding: 60px 0;
    }
    
    .page-header h1 {
        font-size: 36px;
        margin-bottom: 35px;
    }
    
    .cta-button {
        margin-top: 35px;
        padding: 16px 26px;
    }
    
    .card {
        padding: 30px 20px;
    }
    
    .service-details {
        padding: 25px 20px;
    }
}

/* ============================================
   유틸리티 클래스
   ============================================ */
.text-center {
    text-align: center;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* 접근성 개선 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 포커스 스타일 */
a:focus, button:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* 프린트 스타일 */
@media print {
    .header, .footer, .cta-button, .service-link, .detail-link {
        display: none !important;
    }
    
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
    }
}