/* ==========================================================================
   공통 스타일 - styles.css
   ========================================================================== */

/* 기본 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #f59e0b;
    --accent-color-2: #e0e0e0;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --header-height: 80px;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-light);
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 헤더 스타일 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
}

.header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-bottom-color: rgba(37, 99, 235, 0.2);
}

.header-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.logo-section:hover {
    opacity: 0.8;
}

.header-logo {
    height: 50px;
    width: auto;
}

.company-info {
    display: flex;
    flex-direction: column;
}

.company-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.name-1 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.name-2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border-radius: 0.5rem;
    border: none;
    outline: none;
}

.nav-link:hover,
.nav-item:hover .nav-link {
    color: var(--primary-color);
    background: var(--bg-light);
}

.nav-link:focus {
    border: none;
    outline: none;
    box-shadow: none;
}

.nav-link i {
    font-size: 0.75rem;
    transition: var(--transition);
}

.dropdown:hover .nav-link i {
    transform: rotate(180deg);
}

/* 드롭다운 메뉴 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--bg-white);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1100;
    padding: 0.5rem 0;
    border: 1px solid var(--border-color);
}

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

.dropdown-menu li a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
    border: none;
    outline: none;
}

.dropdown-menu li a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.dropdown-menu li a:focus {
    border: none;
    outline: none;
    box-shadow: none;
}

/* 모바일 메뉴 버튼 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 0.25rem;
}

.hamburger {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: var(--transition);
}

.mobile-menu-btn.active .hamburger:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active .hamburger:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* 메인 컨텐츠 */
.main-content {
    padding-top: var(--header-height);
}

/* 섹션 공통 스타일 */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* 페이지 공통 스타일 */
.page-content {
    min-height: calc(100vh - var(--header-height));
    padding-top: var(--header-height);
}

.page-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 3rem 0;
    text-align: center;
    position: relative;
}

.page-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.page-breadcrumb {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.page-breadcrumb .current {
    color: var(--primary-color);
    font-weight: 600;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.page-content-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* 푸터 */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 2rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer-links {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.footer-links a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.footer-copyright {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* 상단으로 버튼 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}

/* 포커스 관리 */
:focus {
    outline: 2px solid var(--accent-color-2);
    outline-offset: 2px;
}

input:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 접근성 */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}

/* ==========================================================================
   반응형 디자인 - 공통
   ========================================================================== */

@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .header-container {
        padding: 0 1.5rem;
    }
    
    .page-content-wrapper {
        padding: 3rem 1.5rem;
    }
    
    .section-title {
        font-size: 2.25rem;
    }
}

@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--bg-white);
        flex-direction: column;
        padding: 2rem;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }
    
    .main-nav.active {
        transform: translateX(0);
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-link {
        padding: 1rem 0;
        width: 100%;
        justify-content: space-between;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: var(--bg-light);
        border-radius: 0;
        margin-top: 0;
        display: none;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .header-container {
        padding: 0 1rem;
    }
    
    .page-content-wrapper {
        padding: 2rem 1rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .company-name {
        font-size: 1.25rem;
    }
    
    .name-1 {
        font-size: 1rem;
    }
    
    .name-2 {
        font-size: 1.25rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .header-logo {
        height: 40px;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}
