:root {
    --primary: #2563eb; --dark: #0f172a; --gray: #64748b; --light: #f8fafc; --white: #ffffff;
}
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Pretendard', sans-serif; }
body { line-height: 1.6; color: var(--dark); background: var(--white); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; transition: 0.3s; }

/* Header */
.header { position: fixed; width: 100%; top: 0; background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); z-index: 1000; border-bottom: 1px solid #eee; height: 70px; }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.nav { display: flex; gap: 30px; font-weight: 600; }
.nav a:hover { color: var(--primary); }

/* Page Common */
.page-banner { background: var(--dark); padding: 120px 0 80px; color: #fff; text-align: center; }
.section-title { font-size: 2.5rem; font-weight: 800; text-align: center; margin-bottom: 50px; position: relative; }
.section-title::after { content: ''; display: block; width: 50px; height: 4px; background: var(--primary); margin: 15px auto; }

/* Company Overview Table */
.overview-table { width: 100%; border-collapse: collapse; margin-top: 30px; }
.overview-table th, .overview-table td { padding: 20px; border-bottom: 1px solid #e2e8f0; text-align: left; }
.overview-table th { width: 25%; background: var(--light); font-weight: 700; color: var(--dark); }

/* Organization Chart */
.org-chart { display: flex; flex-direction: column; align-items: center; gap: 40px; padding: 40px 0; }
.org-node { padding: 20px 40px; background: #fff; border: 2px solid var(--primary); border-radius: 10px; font-weight: 800; color: var(--primary); box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.org-children { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; width: 100%; }
.org-child { padding: 15px 30px; background: var(--primary); color: #fff; border-radius: 5px; font-weight: 600; min-width: 150px; text-align: center; }

/* History Timeline */
.timeline { position: relative; max-width: 900px; margin: 0 auto; padding: 40px 0; }
.timeline::before { content: ''; position: absolute; left: 50px; top: 0; width: 2px; height: 100%; background: #e2e8f0; }
.timeline-item { position: relative; margin-bottom: 50px; padding-left: 100px; }
.timeline-dot { position: absolute; left: 41px; top: 5px; width: 20px; height: 20px; background: var(--primary); border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 0 2px var(--primary); }
.timeline-year { font-size: 1.5rem; font-weight: 900; color: var(--dark); margin-bottom: 10px; display: block; }
.timeline-month { font-weight: 700; color: var(--primary); margin-right: 10px; }
.timeline-content { background: var(--light); padding: 20px; border-radius: 10px; }
.timeline-content ul { list-style: none; }
.timeline-content li { margin-bottom: 8px; position: relative; padding-left: 15px; }
.timeline-content li::before { content: '•'; position: absolute; left: 0; color: var(--primary); }

/* 모바일 메뉴 */
.mobile-btn { display: none; font-size: 1.5rem; background: none; border: none; cursor: pointer; }
.mobile-nav { 
    position: fixed; top: 0; right: -100%; width: 280px; height: 100%; background: #fff; 
    z-index: 2000; padding: 80px 40px; display: flex; flex-direction: column; gap: 25px; 
    transition: 0.4s; box-shadow: -10px 0 30px rgba(0,0,0,0.1); 
}
.mobile-nav.active { right: 0; }

/* Hero & Sections */
.hero { height: 70vh; background-size: cover; background-position: center; display: flex; align-items: center; color: #fff; text-align: center; }
.page-header { background: var(--dark); padding: 120px 0 60px; color: #fff; text-align: center; }
.section { padding: 80px 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }
.card { padding: 40px; background: var(--light); border-radius: 15px; border: 1px solid #e2e8f0; transition: 0.3s; }
.card:hover { transform: translateY(-10px); background: #fff; box-shadow: 0 20px 25px rgba(0,0,0,0.05); }
.card h4::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background: var(--primary);
    margin: 15px auto 0; /* 제목 아래 작은 강조선도 가운데 정렬 */
    opacity: 0.3;
}

/* 서비스 카드 전체 설정 */
.service-card {
    background: #fff;
    padding: 50px 30px;
    border-radius: 20px;
    border: 1px solid #edf2f7;
    text-align: center; /* 텍스트 전체 가운데 정렬 */
    display: flex;
    flex-direction: column;
    align-items: center; /* 내부 요소들을 수직축 중앙으로 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

/* 아이콘 스타일 */
.service-icon {
    font-size: 3.5rem;
    margin-bottom: 25px;
    
    /* 가운데 정렬 핵심 설정 */
    display: block;           /* inline-block에서 block으로 변경 */
    margin-left: auto;        /* 왼쪽 마진 자동 */
    margin-right: auto;       /* 오른쪽 마진 자동 */
    text-align: center;       /* 아이콘(이모지/텍스트) 자체도 중앙 정렬 */
}

/* 제목 스타일 */
.service-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

/* 제목 아래 작은 구분선 (가운데 정렬) */
.service-divider {
    width: 30px;
    height: 2px;
    background: var(--primary);
    margin: 0 auto 20px; /* margin: 0 auto가 중앙 배치의 핵심 */
    opacity: 0.3;
}

/* 설명 문구 스타일 (자동 줄바꿈 핵심) */
.service-desc {
    color: #718096;
    line-height: 1.7;
    font-size: 0.95rem;
    word-break: keep-all; /* 한글 단어 단위로 줄바꿈 (매우 깔끔해짐) */
    text-align: center;
    max-width: 250px; /* 줄바꿈이 예쁘게 일어날 수 있도록 너비 제한 */
    margin: 0 auto;
}

/* Footer (수정된 스타일) */
.footer { background: #111; color: #999; padding: 60px 0; font-size: 0.9rem; border-top: 4px solid var(--primary); }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 30px; }
.footer-logo { color: var(--white); font-size: 1.4rem; font-weight: 800; margin-bottom: 15px; }
.footer-info p { margin-bottom: 5px; line-height: 1.8; }
.footer-copy { color: #555; font-weight: 600; }

/* TOP 버튼 */
#topBtn {
    display: none; position: fixed; bottom: 30px; right: 30px; z-index: 100;
    background: var(--primary); color: #fff; border: none; width: 50px; height: 50px;
    border-radius: 50%; cursor: pointer; font-size: 1.2rem; box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    .timeline::before { left: 20px; }
    .timeline-dot { left: 11px; }
    .timeline-item { padding-left: 50px; }
    .overview-table th { width: 35%; }
}

/* Contact Page Styles */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* 왼쪽 정보, 오른쪽 지도 */
    gap: 60px;
    align-items: start;
}

.contact-info-box {
    padding: 20px 0;
}

.info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.info-icon {
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    background: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.info-text strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--dark);
}

.info-text p {
    color: var(--gray);
    line-height: 1.6;
}

.contact-map {
    width: 100%;
}

/* 모바일 반응형 */
@media (max-width: 992px) {
    .contact-wrapper {
        grid-template-columns: 1fr; /* 세로로 배치 */
        gap: 40px;
    }
}

/* --- 기본 메뉴 숨김/보임 설정 --- */
.mobile-toggle-btn { display: none; } /* 기본은 숨김 */

/* --- 모바일 메뉴 오버레이 스타일 --- */
.mobile-overlay {
    position: fixed; top: 0; right: -100%; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.95); /* 어두운 배경 */
    backdrop-filter: blur(8px); z-index: 2000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* 부드러운 슬라이드 */
}
.mobile-overlay.active { right: 0; } /* active 클래스 추가 시 화면에 나타남 */

.mobile-menu-content {
    position: absolute; right: 0; width: 80%; max-width: 300px; height: 100%;
    background: #fff; padding: 60px 40px; display: flex; flex-direction: column;
}

.close-btn {
    position: absolute; top: 20px; right: 20px; font-size: 2.5rem;
    background: none; border: none; cursor: pointer; color: var(--dark);
}

.mobile-links { display: flex; flex-direction: column; gap: 25px; margin-top: 40px; }
.mobile-links a { font-size: 1.5rem; font-weight: 800; color: var(--dark); text-decoration: none; }

/* --- 해상도별 전환 (핵심!) --- */
@media (max-width: 768px) {
    .nav { display: none; } /* PC 메뉴 숨김 */
    .mobile-toggle-btn { 
        display: flex; flex-direction: column; gap: 6px; background: none; border: none; cursor: pointer;
    }
    /* 햄버거 아이콘 선 모양 */
    .mobile-toggle-btn span { width: 25px; height: 3px; background: var(--primary); border-radius: 2px; }
}