:root {
    --left-control: 400px; /* 이미지 전체 왼쪽 이동 거리 */
    --top-control: 100px;   /* 이미지 전체 위쪽 이동 거리 */
}

/* ----- Basic Style Reset ----- */
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #ffffff;
    color: #333;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ----- Main Manual Content Container ----- */
.manual-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 100px 40px;
    position: relative; /* [추가] ::before 가상 요소의 position 기준으로 설정 */
    isolation: isolate; /* [추가] z-index가 다른 요소와 꼬이는 것을 방지 */
    background-color: #ffffff;

}

/* 배경 이미지 (그레이스케일) */
.manual-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    filter: grayscale(100%) blur(2px);
    opacity: 0.2;
    z-index: -1; /* [수정] 콘텐츠보다 뒤에 위치하도록 음수 값으로 변경 */
}

/* ----- Header Section ----- */
.manual-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* 변경: 콘텐츠를 상단 정렬 */
    margin-bottom: 120px; /* 하단 마진 증가 */
    position: relative;
    top: 40px;
    color: rgb(0, 0, 0);
    flex-wrap: wrap; /* 추가: 공간이 부족할 때 줄바꿈 허용 */
    gap: 20px; /* 추가: 줄바꿈 시 섹션 사이의 간격 */
}

/* .main-content-text h2:lang(ko) {
    font-family: 'Pretendard', sans-serif;
}

.main-content-text h2:lang(en) {
    font-family: 'Plus Jakarta Sans', sans-serif;
} */

.manual-header-left {
    flex: 1;
    min-width: 600px;
}

.manual-header-right {
    flex: 1;
    max-width: 600px;
    padding-top: 20px;
    padding-right: 150px;
    min-width: 250px;

}

.manual-header h1 {
    font-size: 70px; /* 폰트 크기 조정 */
    font-weight: 900;
    margin-bottom: 16px; /* 마진 조정 */
    line-height: 1.1; /* 줄 간격 조정 */
    font-family: 'Plus Jakarta Sans', sans-serif;

}

.manual-header .sub-title {
    font-size: 35px; /* 폰트 크기 조정 */
    font-weight: 500; /* 폰트 두께 조정 */
    color: #888; /* 폰트 색상 변경 */
    margin-bottom: 24px;
}

.manual-header .sub-title:lang(ko) {
    font-family: 'Pretendard', sans-serif;
}

.manual-header .sub-title:lang(en) {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* 오른쪽 섹션 h2 스타일 추가 */
.manual-header-right h2 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.3;
}

.manual-header-right h2:lang(ko) {
    font-family: 'Pretendard', sans-serif;
}

.manual-header-right h2:lang(en) {
    font-family: 'Plus Jakarta Sans', sans-serif;
}


.manual-header .description {
    font-size: 18px; /* 폰트 크기 조정 */
    line-height: 1.8; /* 줄 간격 조정 */
    color: #000000; /* 폰트 색상 조정 */
    word-break: keep-all;
    text-align: justify;
}

.manual-header .description:lang(ko) {
    font-family: 'Pretendard', sans-serif;
}

.manual-header .description:lang(en) {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ----- Manual Grid Layout ----- */
.manual-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* ----- Individual Manual Item ----- */
.manual-item {
    /* position: relative; */
    cursor: pointer;
    display: block;
    /* object-fit: contain; */
    /* box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); */ /* 그림자 제거 */
    /* background-color: #fff; */ /* 배경색 제거 */
}

.manual-item-image-wrapper {
    overflow: hidden;
}

.manual-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.manual-item:hover img {
    transform: scale(1.05);
}

.manual-item-content {
    padding: 0px 0px; /* 상하 여백 추가 */
    display: flex;
    align-items: center;
    transition: none;
    position: relative; /* 자식 요소의 위치 기준으로 설정 */
    justify-content: space-between; /* 텍스트와 아이콘 공간 확보 */
}

.manual-item-text h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #000000; /* 흰색 유지 */
    margin-bottom: -15px; /* 원하는 간격(px)으로 조절 */
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.manual-item-text p {
    font-size: 0.9rem;
    color: #555555; /* 연한 회색 유지 */
    font-family: 'Plus Jakarta Sans', sans-serif;

}

.plus-icon {
    position: absolute; /* 절대 위치 유지 */
    top: -20px; /* 상위 요소의 세로 중앙 */
    right: 0px; /* 오른쪽에 배치 */
    transform: translateY(-50%); /* 정확한 세로 중앙 정렬 */
    width: 40px;
    height: 40px;
    background-color: #111111;
    color: white;
    border-radius: 0%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.manual-item:hover .plus-icon {
    transform: translateY(-50%) rotate(90deg);
}
/* ----- Popup Styles ----- */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-window {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 90%;
    max-width: 1400px;
    height: 90%;
    max-height: 800px;
    background-color: #fff;
    border-radius: 0px;
    z-index: 1001;
    transform: translate(-50%, -50%) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.popup-overlay.active .popup-window {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

.popup-header {
    display: flex;
    justify-content: flex-end;
    padding: 10px 20px;
}

#popup-close {
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    color: #888;
}

.popup-content {
    padding: 0 40px 40px;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    gap: 30px;
}

.popup-text {
    flex: 0.6;
}

.popup-text h2 {
    font-size: 1.1rem;
    color: #B1B1B1;
    font-weight: bold;
    margin-bottom: 5px;
}
.popup-text h3 {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 20px;
}
.popup-text p {
    font-size: 1rem;
    line-height: 1.7;
    color: #888888;
    word-break: keep-all;
    text-align: left;
}

.popup-media {
    flex: 1.5;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.popup-media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.popup-media-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    height: 100%;
    align-content: center;
}

.popup-media-grid .main-image {
    width: 100%;
    border-radius: 8px;
}

.popup-media-grid .sub-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.popup-media-grid .sub-images img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #eee;
}

.popup-media-etm {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-media-etm img {
    position: absolute;
    max-width: 80%;
    max-height: 80%;
}

.popup-media-etm .etm-image-1 {
    transform: rotate(-10deg) translate(-20%, -15%);
    z-index: 1;
}

.popup-media-etm .etm-image-2 {
    transform: rotate(5deg) translate(20%, 15%);
    z-index: 2;
}

.popup-media-column {
    --image-overlap: 100px; /* 겹침 정도를 조절하는 변수 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 80%;
    padding-bottom: var(--image-overlap); /* 아래쪽 여백 추가 */
}

.popup-media-column img {
    top: 60px;
    width: 95%;
    border-radius: 8px;
    border: 1px solid #eee;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative; /* z-index 적용을 위해 필요 */
}

.popup-media-column img:not(:first-child) {
    margin-top: calc(-1 * var(--image-overlap));
}

/* 이미지가 겹쳤을 때 위로 올라오는 순서 조정 */
.popup-media-column img:nth-child(1) { z-index: 1; }
.popup-media-column img:nth-child(2) { z-index: 2; }
.popup-media-column img:nth-child(3) { z-index: 3; }


/* ----- New Popup Media Stack Styles ----- */
.popup-media-stack {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-media-stack img {
    position: absolute;
    border-radius: 5px;
}

/* PMS Stack */
.pms_stack .stack-image-1 { width: 475px; top: calc(99px - var(--top-control)); left: calc(480px - var(--left-control)); }
.pms_stack .stack-image-2 { width: 475px; top: calc(199px - var(--top-control)); left: calc(603px - var(--left-control)); }
.pms_stack .stack-image-3 { width: 475px; top: calc(479px - var(--top-control)); left: calc(230px - var(--left-control)); }
.pms_stack .stack-image-4 { width: 475px; top: calc(326px - var(--top-control)); left: calc(767px - var(--left-control)); }

/* PMS 팝업 하단 LTS PC 이미지 (조절 가능) */
.pms-extra-image {
    position: absolute;
    left: 420px;
    bottom: -90px;
    transform: translateX(-50%);
    width: 480px;
    max-width: 90vw;
    z-index: -1;
    pointer-events: none;
    opacity: 1;
    scale: 0.7;
    /* 필요시 아래 속성으로 조절 */
    /* height: auto; */
    /* filter: drop-shadow(0 4px 16px rgba(0,0,0,0.08)); */
}

/* MMS Stack */
.mms_stack .stack-image-1 { width: 513px; top: calc(133px - var(--top-control)); left: calc(480px - var(--left-control)); }
.mms_stack .stack-image-2 { width: 513px; top: calc(286px - var(--top-control)); left: calc(569px - var(--left-control)); }
.mms_stack .stack-image-3 { width: 513px; top: calc(441px - var(--top-control)); left: calc(680px - var(--left-control)); }

/* CMS Stack */
.cms_stack .stack-image-1 { width: 513px; top: calc(104px - var(--top-control)); left: calc(553px - var(--left-control)); }
.cms_stack .stack-image-2 { width: 513px; top: calc(276px - var(--top-control)); left: calc(699px - var(--left-control)); }
.cms_stack .stack-image-3 { width: 513px; top: calc(435px - var(--top-control)); left: calc(453px - var(--left-control)); }

/* EAS Stack */
.eas_stack .stack-image-1 { width: 783px; top: calc(196px - var(--top-control)); left: calc(449px - var(--left-control)); }
.eas_stack .stack-image-2 { width: 397px; top: calc(493px - var(--top-control)); left: calc(135px - var(--left-control)); }

/* OPDS Stack */
.opds_stack .stack-image-2 { width: 660px; top: calc(104px - var(--top-control)); left: calc(441px - var(--left-control)); }
.opds_stack .stack-image-1 { width: 660px; top: calc(354px - var(--top-control)); left: calc(557px - var(--left-control)); }

/* DOS Stack */
.dos_stack .stack-image-1 { width: 564px; top: calc(102px - var(--top-control)); left: calc(508px - var(--left-control)); }
.dos_stack .stack-image-2 { width: 564px; top: calc(251px - var(--top-control)); left: calc(659px - var(--left-control)); }
.dos_stack .stack-image-3 { width: 564px; top: calc(421px - var(--top-control)); left: calc(458px - var(--left-control)); }


/* ----- Responsive Design ----- */
@media (max-width: 1300px) {
    .manual-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    .popup-content {
        flex-direction: column;
        gap: 20px;
        padding: 0 20px 20px;
        overflow-y: auto;
    }
    .popup-text {
        flex: none;
    }
    .popup-media {
        flex: 1;
        min-height: 350px;
    }
    .popup-media-stack {
        transform: scale(0.8);
    }
    .manual-header-right {
    flex: 1;
    max-width: 600px;
    padding-top: 30px;
    padding-right: 0px;
}
.manual-header h1 {
    font-size: 70px; 

}

}

@media (max-width: 1024px) {
    .manual-header {
        flex-direction: column;
        gap: 30px;
        margin-bottom: 80px;
    }
    .manual-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .manual-header-left {
    flex: 1;
    min-width: 0px;
}
    .manual-header-right {
    flex: 1;
    width: 100%;
    min-width: 0px;
    }
    .manual-container {
        padding: 60px 10px;
    }
    .manual-header {
        gap: 20px;
    }
    .manual-header h1 {
        font-size: 3rem;
    }
    .manual-header .sub-title {
        font-size: 1.2rem;
    }
    .manual-header-right h2 {
        font-size: 1.8rem;
    }
    .manual-grid {
        grid-template-columns: 1fr;
    }
    .popup-window {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        max-height: none;
    }
    .popup-content {
        padding: 0 15px 20px;
        gap: 20px;
    }
    .popup-text h3 {
        font-size: 1.5rem;
    }
    .popup-media-stack {
        transform: scale(0.6);
    }
}

