/* company.css - 회사소개 페이지 스타일 */

/* 스크롤바 깜빡임 방지 */
html {
    scrollbar-gutter: stable;
    height: auto;
}

body {
    height: auto;
    overflow-y: visible;
}

/* ===================== */
/* 간단한 변수들          */
/* ===================== */
:root {
  --main-blue: #1e3a5f;
  --light-blue: #4a90e2;
  --light-gray: #f8f9fa;
  --border-gray: #e9ecef;
  
  /* 타임라인 선 높이 변수 */
  --timeline-line-top: 70px;
  --timeline-line-bottom: 70px;
  --timeline-line-height: 500px;  /* 안전한 기본값 */
}

/* ===================== */
/* Hero Section          */
/* ===================== */
.hero-background {
    background-image: url('/images/introduce.png');
    background-color: linear-gradient(135deg, rgba(30, 58, 95, 0.8) 0%, rgba(45, 90, 139, 0.8) 50%, rgba(74, 144, 226, 0.8) 100%);
}

  
/* ===================== */
/* History Section       */
/* ===================== */

/* History 컨테이너 */
.history-section {
    padding: 3rem 0;
    user-select: none;
}

/* 제목 스타일 - TTS 페이지와 동일 */
.tab-content h2 {
    font-size: 2.5rem;
    color: var(--main-blue);
    margin-bottom: 30px;
    text-align: center;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.tab-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--main-blue);
    border-radius: 2px;
}

/* ===================== */
/* Timeline              */
/* ===================== */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 60px auto 0;
    padding: 40px 20px;
}

/* 중앙 배경선 (회색) - JavaScript에서 동적으로 설정 */
        .timeline::before {
            content: '';
            position: absolute;
            left: var(--bg-line-left, 50%);
            width: 4px;
            background: #e2e8f0;
            transform: var(--draw-line-transform, translateX(-50%));
            z-index: 1;
            top: var(--bg-line-top, 0px);
            height: var(--bg-line-height, 0px);
        }

/* 스크롤에 따라 채워지는 선 (파란색) - JavaScript에서 동적으로 설정 */
.timeline .draw-line {
    position: absolute;
    left: var(--draw-line-left, 50%);
    width: 4px;
    height: 0;
    background: #1e3a5f;
    transform: var(--draw-line-transform, translateX(-50%));
    z-index: 2;
    display: block;
}

/* 타임라인 동그라미 (JavaScript에서 생성) */
.timeline-circle {
    position: absolute;
    width: 16px;
    height: 16px;
    background: #1e3a5f;
    border: 4px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #1e3a5f;
    z-index: 20;
    transform: scale(0);
    transition: transform 0.3s ease-out;
}

/* 연도 표시 */
.timeline-year {
    position: relative;
    text-align: center;
    margin-bottom: 30px;
    z-index: 10;
    display: flex;
    align-items: center;
}

.timeline-item.left .timeline-year {
    text-align: right;
    justify-content: flex-end;
}

.timeline-item.right .timeline-year {
    text-align: left;
    justify-content: flex-start;
}

.year-number {
    display: inline-block;
    background: transparent;
    color: #333;
    font-size: 2.5rem;
    font-weight: 800;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    letter-spacing: -0.05em;
}

/* 타임라인 아이템 */
.timeline-item {
    position: relative;
    margin-bottom: 60px;
    width: 45%;
}

.timeline-item.left {
    left: 0;
    text-align: right;
}

.timeline-item.right {
    left: 55%;
    text-align: left;
}

/* 타임라인 콘텐츠 */
.timeline-content {
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 40px;
}

.timeline-content:last-child {
    margin-bottom: 0;
}

.timeline-item.right .timeline-content {
    flex-direction: row-reverse;
}

.timeline-item.left .timeline-content {
    justify-content: space-between;
    align-items: flex-start;
}

.timeline-item.right .timeline-content {
    justify-content: space-between;
    align-items: flex-start;
}

.timeline-item.left .month {
    text-align: right;
    margin-left: auto;
    flex-shrink: 0;
    font-weight: 700;
}

.timeline-item.right .month {
    text-align: left;
    margin-right: auto;
    flex-shrink: 0;
    font-weight: 700;
}

.event-title {
    flex: 1;
    margin-right: 10px;
    word-break: keep-all;
}

.timeline-content:hover {
    transform: translateY(-5px);
}

.month {
    display: inline-block;
    color: #ccc;
    font-size: 1.1em;
    font-weight: 700;
    flex-shrink: 0;
}

.event-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    flex: 1;
}
  
/* ===================== */
/* Location Section      */
/* ===================== */
.location-section {
    padding: 3rem 0 5rem 0;
    background-color: var(--light-gray);
    user-select: none;
}

.location-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    max-width: 1200px;
    margin: 3.75rem auto 0;
    padding: 0 1.25rem;
}

.location-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: transparent;
    border-radius: 8px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--main-blue);
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.info-text h3 {
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-text p {
    margin: 0;
    color: #666;
    line-height: 1.5;
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #bbb;
    padding: 0;
    margin: 0;
    transition: color 0.2s;
    line-height: 1;
    font-weight: normal;
    display: flex;
    align-items: center;
}

.copy-btn i {
    font-size: 15px !important;
}

.copy-btn:hover {
    color: var(--main-blue);
}

.copy-btn.copied {
    color: #28a745;
}

.map-container {
    height: 530px;
    overflow: hidden;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#map {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: white; /* 로딩 전 하얀색 배경으로 전체 영역 커버 */
    border-radius: 8px;
    overflow: hidden;
    /* 지도 로딩 전에도 전체 영역을 차지하도록 */
    min-height: 530px;
    display: block;
}




  
/* ===================== */
/* Menu Tabs             */
/* ===================== */
/* 탭 시스템은 common.css에서 관리 */
  
/* ===================== */
/* Responsive            */
/* ===================== */
  
/* ≤ 992px - 태블릿 */
@media (max-width: 992px) {
    .hero-title { font-size: 2.8rem; }
    .hero-desc  { font-size: 1.1rem; }
  
    .history-section { padding: 3.75rem 0; }
    .history-section h2 {
        margin-bottom: 2.5rem;
        font-size: 2rem;
    }
  
    .timeline-item,
    .timeline-item.left,
    .timeline-item.right {
        width: calc(100% - 80px);
        left: 60px;
        text-align: left;
        position: relative;
    }

    .timeline-item::before {
        left: -38px;
    }

    .year-number {
        font-size: 1.5rem;
        padding: 0;
    }

    .timeline-content {
        padding: 0;
        text-align: left;
        justify-content: flex-start;
        flex-direction: row;
    }

    .timeline-item.left .timeline-year,
    .timeline-item.right .timeline-year {
        text-align: left;
        justify-content: flex-start;
        margin-bottom: 10px;
    }
    
    .timeline-item.left .timeline-content,
    .timeline-item.right .timeline-content {
        text-align: left;
        justify-content: flex-start;
        flex-direction: row;
    }
    
    .timeline-item.left .month,
    .timeline-item.right .month {
        text-align: left;
        margin-left: 0;
        margin-right: 10px;
        order: 1;
        display: inline-block;
        vertical-align: middle;
        line-height: 1.4;
    }
    
    .timeline-item.left .event-title,
    .timeline-item.right .event-title {
        order: 2;
        margin-right: 0;
        display: inline-block;
        vertical-align: middle;
        line-height: 1.4;
    }
}
  
/* ≤ 768px - 모바일 가로 */
@media (max-width: 768px) {
    .hero-content h1 {
        margin-bottom: 15px;
        font-size: 2.2rem;
    }
    .hero-content p {
        padding: 0 1.25rem;
        font-size: 1rem;
    }
  
    .tabs-container {
        flex-direction: row;
        gap: 0;
        padding: 0 1.25rem;
    }
    .tab-item {
        flex: 1;
        padding: 15px 10px;
    }
    .tab-item span { font-size: 1rem; }
  
    .tab-content .history-section,
    .tab-content .location-section {
        padding: 2.5rem 1.25rem;
    }
  
    .location-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 100px;
    }
    .location-section h2 { font-size: 2rem; }
    .info-item { padding: 1rem; }
    .info-item i { font-size: 1.2rem; }
    .info-text h3 { font-size: 1rem; }
    .map-container {
        height: 400px;
        min-height: 400px;
        margin-top: 2.5rem;
    }
    #map { height: 100%; }
}
  
/* ≤ 480px - 모바일 세로 */
@media (max-width: 480px) {
    .hero-title { font-size: 2.2rem; }
    .hero-desc  { font-size: 1rem; }
  
    .timeline { padding: 2.5rem 15px; }
    .timeline-item,
    .timeline-item.left,
    .timeline-item.right {
        width: calc(100% - 60px);
        left: 45px;
        text-align: left;
        position: relative;
    }

    .timeline-item::before {
        left: -30px;
    }
    
    .timeline-content {
        padding: 0;
        text-align: left;
        justify-content: flex-start;
        flex-direction: row;
    }
    
    .timeline-item.left .timeline-content,
    .timeline-item.right .timeline-content {
        text-align: left;
        justify-content: flex-start;
        flex-direction: row;
    }
    
    .timeline-item.left .month,
    .timeline-item.right .month {
        text-align: left;
        margin-left: 0;
        margin-right: 10px;
        order: 1;
        display: inline-block;
        vertical-align: middle;
        line-height: 1.4;
    }
    
    .timeline-item.left .event-title,
    .timeline-item.right .event-title {
        order: 2;
        margin-right: 0;
        display: inline-block;
        vertical-align: middle;
        line-height: 1.4;
    }
    .event-title { font-size: 1rem; }
  
    .map-container {
        height: 350px;
        min-height: 350px;
    }
    #map { height: 100%; }
}
  
