/* ===================================
   INTRODUCE PAGE - 통합 CSS
   =================================== */

/* 기본 컨테이너 스타일 - X축 스크롤 방지 */
body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

* {
    box-sizing: border-box;
}

.page-container {
    width: 100%;
    max-width: 100vw;
    overflow-x: initial;
    margin-top: 450px; /* 헤더 높이만큼 여백 */
}

.content-section {
    width: 100%;
    max-width: 100vw;
}

.content-even {
    background-color: #f5f5f5;
}

.section-wrapper {
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 50px 40px;
}

.section-side {
    width: 400px;
    flex-shrink: 0;
    min-width: 0;
}

.section-content {
    flex: 1;
    position: relative;
    min-width: 0;
    width: 100%;
}

/* Sticky 사이드 타이틀 */
.history-intro {
    position: sticky;
    top: 100px;
}

/* 모든 이미지 반응형 처리 */
img {
    max-width: 100%;
    height: auto;
}

/* 텍스트 오버플로우 방지 */
.side-title,
.history-number,
.timeline-date,
.timeline-content,
.value-content h3,
.value-content p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: inline-block;
}


/* ===================================
   TYPOGRAPHY & COMMON ELEMENTS
   =================================== */

.content-desc {
    font-size: 1.2em;
    font-weight: 500;
    line-height: 1.5;
}

.side-title {
    font-size: 3rem;
    font-weight: 600;
    line-height: 1.5;
}

.history-number {
    font-size: 18px;
    color: #ffcd3c;
    display: block;
}

.closing {
    margin-top: 100px;
    text-align: right;

    color: black;
    font-weight: 700;
}

/* ===================================
   PHILOSOPHY SECTION
   =================================== */

   .value-content h3{
    display: block;
   }

   .value-desc-p{
        display: block;
   }

.philosophy-container {
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.core-values {
    padding-top: 70px;
    position: relative;
}

.values-grid {
    width: 100%;
}

.value-card {
    display: flex;
    align-items: flex-start;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.value-number {
    font-size: 16px;
    color: #999;
    min-width: 100px;
    padding-top: 3px;
    font-weight: 500;
}

.value-content {
    flex: 1;
}

.value-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
}

.value-card p {
    color: #555;
    line-height: 1.6;
    font-size: 16px;
}

.philosophy-conclusion {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-size: 25px;
    color: #333;
    word-break: keep-all;
}

/* ===================================
   CEO MESSAGE & INTRO SECTION
   =================================== */

.intro-text {
    font-size: 20px;
    line-height: 1.6;
    color: #555;
}

/* ===================================
   CI/BI SECTION
   =================================== */

.ci-grid {
    padding: 15px 0;
}

.section-title {
    font-size: 32px;
    margin-bottom: 20px;
    color: #333;
    position: relative;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.grid-item {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 20px;
}

/* ===================================
   HISTORY/TIMELINE SECTION
   =================================== */

.timeline-container {
    position: relative;
    width: 100%;
    overflow: visible;
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

.timeline-content-wrapper {
    flex: 1;
    min-width: 0;
}

.history-image-container {
    width: 400px;
    flex-shrink: 0;
    height: 165vh; /* sticky 작동을 위한 충분한 높이 */
    position: relative;
}

.history-sticky-image {
    position: sticky;
    top: 500px;
    width: 100%;
    height: fit-content;
    z-index: 10;
}

.history-sticky-image img {
    width: 100%;
    height: auto;
    transition: opacity 0.5s ease, transform 0.5s ease;
    display: block; /* 이미지 하단 여백 제거 */
}

.timeline-section {
    position: relative;
    padding-left: 50px;
    margin-bottom: 10px;
    width: 100%;
}

/* 전체 타임라인 라인 컨테이너 (기본 회색 라인) */
.timeline-section::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 30px;
    bottom: 0;
    width: 2px;
    background-color: #eee;
    z-index: 1;
}

/* 🔥 새로운 진행 라인 (::after 가상 요소) - 스크롤에 따라 높이 변경 */
.timeline-section::after {
    content: '';
    position: absolute;
    left: 20px;
    top: 30px;
    width: 2px;
    background-color: #ffcd3c;
    height: var(--timeline-progress, 0px); /* JavaScript에서 조절 */
    z-index: 2; /* 기본 라인 위에 */
    transition: none; /* 스크롤에 즉시 반응 */
    transform-origin: top;
}

.year-marker {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    padding: 10px 0;
    word-break: keep-all;
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
    padding-left: 0;
    width: 100%;
    box-sizing: border-box;
}

/* 타임라인 아이템이 활성화될 때 */
.timeline-item.active {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -36px;
    top: 5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: #ddd; /* 기본 회색으로 시작 */
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    /* 기본적으로 보이도록 설정 */
    opacity: 1;
    transform: scale(1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 3; /* 진행 라인 위에 */
}

/* dot이 활성화될 때 - 골드 색상 + 바운스 효과 */
.timeline-item.active::before {
    background-color: #ffcd3c;
    box-shadow: 0 2px 8px rgba(255, 205, 60, 0.3);
    transform: scale(1.1);
}

.timeline-date {
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
    word-break: keep-all;
}

.timeline-date:after {
    content: '  ';
    display: inline-block;
    margin: 0 3px;
}

.timeline-content {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    word-break: break-word;
}

/* ===================================
   LOCATION SECTION
   =================================== */

.map-container {
    width: 100%;
}

.location-info {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
}

.company-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-area {
    width: 250px;
    max-width: 100%;
    flex-shrink: 0;
}

.logo-img {
    width: 100%;
    height: auto;
}

.address-area {
    flex: 1;
    min-width: 0;
}

.company-info .address {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.address-detail {
    font-size: 14px;
    color: #666;
}

.contact-info {
    display: flex;
    gap: 30px;
    justify-content: flex-start;
}

.contact-info p {
    font-size: 14px;
    color: #666;
}

.contact-info i {
    margin-right: 8px;
    color: #999;
}

#map {
    width: 100%;
    height: 400px;
    margin-top: 30px;
}

/* ===================================
   MODAL STYLES
   =================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    background-color: white;
    padding: 10px;
    border-radius: 10px;
    animation: zoom 0.6s;
    position: relative;
}

@keyframes zoom {
    from {transform: scale(0.1)}
    to {transform: scale(1)}
}

.close {
    position: absolute;
    top: 10%;
    right: 10%;
    color: #fff;
    font-size: 45px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.close:hover,
.close:focus {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    cursor: pointer;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* 태블릿 */
@media (max-width: 1024px) {
    .section-wrapper {
        flex-direction: column;
        padding: 50px 20px;
        max-width: 100%;
    }

    .section-side {
        width: 100%;
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        max-width: 600px;
    }
    
    .grid-item img {
        padding: 15px;
    }

    .container {
        padding: 0 15px;
    }
}

/* 모바일 */
@media (max-width: 768px) {

    .section-title{
        font-size: 20px;
    }

    .intro-text{
        font-size: 16px;
    }



    .mobile-logo{
        background: white;
    }

    .page-container {
        margin-top: 300px;
    }

    .section-wrapper {
        padding: 30px 15px;
        max-width: 100%;
    }


    .side-title {
        font-size: 2rem;
        word-break: keep-all;
    }

    .content-desc {
        font-size: 1rem;
        word-break: break-word;
    }

    .history-number {
        font-size: 16px;
    }

    .company-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .logo-area {
        width: 150px;
        border-right: none;
        padding-right: 0;
    }

    .address-area {
        padding-left: 0;
        width: 100%;
    }

    .contact-info {
        flex-direction: row;
        gap: 10px;
        width: 100%;
    }

    .contact-info p {
        word-break: break-word;
    }

    .timeline-section {
        padding-left: 30px;
    }

    .timeline-section::before {
        left: 15px;
    }

    /* 모바일에서 진행 라인 위치 조정 */
    .timeline-section::after {
        left: 15px;
        /* 모바일에서는 애니메이션 없이 전체 라인 표시 */
        height: 100% !important;
    }

    .timeline-item {
        padding-left: 20px;
        /* 모바일에서는 애니메이션 없이 즉시 표시 */
        opacity: 1 !important;
        transform: translateY(0) !important;
    }

    .timeline-item::before {
        left: -20px;
        width: 12px;
        height: 12px;
        /* 모바일에서는 애니메이션 없이 즉시 표시 */
        opacity: 1 !important;
        transform: scale(1) !important;
        /* 모바일에서는 모든 dot을 골드 색상으로 */
        background-color: #ffcd3c !important;
    }

    .year-marker {
        font-size: 20px;
    }

    .timeline-date {
        font-size: 14px;
    }

    .timeline-content {
        font-size: 13px;
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        max-width: 500px;
        padding: 15px 0;
    }
    
    .grid-item {
        border-radius: 12px;
    }
    
    .grid-item img {
        padding: 12px;
    }

    .value-card {
        padding: 20px 0;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .value-number {
        min-width: auto;
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .value-card h3 {
        font-size: 20px;
        word-break: keep-all;
    }
    
    .value-card p {
        font-size: 14px;
        word-break: break-word;
    }

    .philosophy-conclusion {
        font-size: 20px;
        padding: 20px 15px;
    }

    .container {
        padding: 0 10px;
    }

    .close {
        top: -25px;
        right: -25px;
        width: 50px;
        height: 50px;
        font-size: 35px;
    }

    .modal-content {
        width: 90%;
        padding: 20px 10px;
    }

    /* 연혁 이미지 반응형 스타일 */
    .timeline-container {
        flex-direction: column;
        gap: 30px;
    }

    .history-image-container {
        display: none; /* 모바일/태블릿에서 이미지 숨김 */
    }

    .timeline-content-wrapper {
        width: 100%;
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        max-width: 500px;
        padding: 15px 0;
    }
}

/* 작은 모바일 */
@media (max-width: 480px) {
    .page-container {
        margin-top: 150px;
    }

    .section-wrapper {
        padding: 20px 10px;
    }

    .side-title {
        font-size: 1.5rem;
    }

    .content-desc {
        font-size: 0.9rem;
    }

    .timeline-section {
        padding-left: 25px;
    }

    .timeline-section::before {
        left: 10px;
    }

    /* 작은 모바일에서 진행 라인 위치 조정 */
    .timeline-section::after {
        left: 10px;
        /* 작은 모바일에서도 애니메이션 없이 전체 라인 표시 */
        height: 100% !important;
    }

    .timeline-item {
        padding-left: 15px;
        /* 작은 모바일에서도 애니메이션 없이 즉시 표시 */
        opacity: 1 !important;
        transform: translateY(0) !important;
    }

    .timeline-item::before {
        left: -22px;
        width: 15px;
        height: 15px;
        /* 작은 모바일에서도 애니메이션 없이 즉시 표시 */
        opacity: 1 !important;
        transform: scale(1) !important;
        /* 작은 모바일에서도 모든 dot을 골드 색상으로 */
        background-color: #ffcd3c !important;
    }

    .year-marker {
        font-size: 18px;
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        max-width: 350px;
        padding: 10px 0;
    }
    
    .grid-item {
        border-radius: 10px;
    }
    
    .grid-item img {
        padding: 10px;
    }
    
    .grid-item:hover {
        transform: translateY(-4px);
    }

    .philosophy-conclusion {
        font-size: 18px;
        padding: 20px 10px;
    }

    .value-card h3 {
        font-size: 18px;
    }

    .value-card p {
        font-size: 13px;
    }

    .modal{
        z-index: 10000;
    }

    .close {
        z-index: 10001;
        top: 50px !important;
        right: 20px !important;
        width: 40px;
        height: 40px;
        font-size: 25px;
    }

    .modal-content {
        width: 95%;
    }

    
}


@media (max-width: 480px) {
    .header-text-area {
        height: 400px !important;
    }

    .content-desc{
        font-size: 15px !important;
        font-weight: 700 !important;
        text-align: left !important; 
    }
    
}


/* ===================================
   RESPONSIVE DESIGN END
   =================================== */ 