body {
    background-color: white;
    margin: 0;
    
}

body.fade {
    opacity: 0; /* 초기 불투명도 */
    transition: opacity 0.8s ease-in-out; /* 천천히 나타나는 효과 */
}

body.fade.in {
    opacity: 1; /* 화면이 완전히 나타남 */
}

.frame {
    /* margin: 30px 150px; */
    display: flex;
    flex-direction: column;
}



/******** 1.Header 스타일 ********/
header {
    position: fixed; /* 화면에 고정 */
    top: 0;
    left: 0;
    width: 100%; /* 헤더를 화면 너비에 맞춤 */
    z-index: 400; /* 다른 요소 위에 표시 */
    background-color: white; /* 헤더 배경색 */
    padding: 0px 0; /* 위아래 여백 */
}

/* Navigator 스타일 */
.navigator {
    display: flex;
    justify-content: space-between; /* 좌우 요소 정렬 */
    align-items: center; /* 세로 가운데 정렬 */
    padding: 0 10%; /* 좌우 여백 */
}

/* h1 스타일 */
.site-name {
    text-decoration: none; /* 링크 밑줄 제거 */
    font-size: 45px;
    font-family: "Montserrat", sans-serif;
    margin: 0;
    color: black;
    padding-right: 10%;
}

/* Navigation 메뉴 스타일 */
.nav-menu {
    list-style: none; /* 리스트 불릿 제거 */
    display: flex; /* 플렉스 정렬 */
    gap: 100px; /* 항목 간격 */
    margin: 0;
    padding-right: 15%;
}

.nav-menu li a {
    text-decoration: none; /* 링크 밑줄 제거 */
    color: black; /* 링크 색상 */
    font-size: 23px;
    font-weight: bold;
    transition: color 0.3s ease; /* 호버 전환 효과 */
}

.nav-menu li a:hover {
    color: blue;
}

/* SNS 아이콘 */
.work-footericon {
    width: 70px; /* 아이콘 크기 */
    height: 70px; /* 아이콘 크기 */
    margin: 0;
}

/* 아이콘 이미지 크기 */
.nav-menu li a img {
    width: 30px; /* 아이콘 크기 */
    height: 30px; /* 아이콘 크기 */
    margin-right: 8px; /* 텍스트와 아이콘 간 간격 */
}

/* 모바일 반응형 (아이폰12프로 화면에 맞게) */
@media screen and (max-width: 430px) {
    .navigator {
        flex-direction: column; /* 세로로 배치 */
        justify-content: center; /* 중앙 정렬 */
        padding: 0 5%; /* 좌우 여백 축소 */
    }

    .site-name {
        font-size: 40px; /* 글자 크기 축소 */
        padding-right: 0;
        text-align: center; /* 텍스트 중앙 정렬 */
        margin-bottom: 5px; /* 메뉴와 간격을 줘서 떨어뜨리기 */
    }
    
    .nav-menu {
        gap: 20px; /* 항목 간격 좁히기 */
        text-align: center; /* 메뉴 텍스트 중앙 정렬 */
    }

    .nav-menu li a {
        font-size: 15px; /* 글자 크기 축소 */
    }
}

/******** 1.Header 스타일 여기까지 ********/






/******** 2.갤러리 스타일 ********/

.frame {
    /* padding: 140px; */
    font-family: Arial, sans-serif;
}

.recent-image-container {
    display: grid; /* Grid 레이아웃 활성화 */
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); /* 최소 200px, 최대 1fr */
    gap: 0 10px; /* 아이템 간 간격 */
    justify-content: center; /* 그리드 자체를 가로로 중앙 정렬 */
    padding-bottom: 10%;
    padding: 0 7%;
}

/* 이미지와 텍스트 그룹 스타일 */


/* 이미지 스타일 */
.recent-image {
    width: 100%; /* 그리드 셀에 꽉 차게 */
    height: 100%; /* 모든 이미지 높이를 동일하게 고정 */
    object-fit: cover; /* 이미지가 잘리지 않도록 조정 */
    border-radius: 0; /* 네모난 모양 */
    margin-bottom: 10px; /* 텍스트와의 간격 */
    transition: filter 0.3s ease; /* 부드러운 전환 효과 */
    filter: brightness(70%); /* 밝기 조절 (70%로 약간 어둡게 설정) */
}


.recent-image-item {
    display: flex; /* Flexbox 활성화 */
    flex-direction: column; /* 세로 정렬 */
    align-items: flex-start; /* 왼쪽 정렬 */
    text-align: left; /* 텍스트 정렬 */
    opacity: 0;
    transform: scale(0.95); /* 약간 축소된 상태에서 시작 */
    transition: opacity 0.5s ease, transform 0.5s ease; /* 부드러운 전환 */
}

.recent-image-item.show {
    opacity: 1;
    transform: scale(1); /* 원래 크기로 복구 */
}


.pagination-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination-btn, .page-number {
    padding: 5px;
    cursor: pointer;
    color: grey;
}

.page-number {
    margin: 0 5px;
    color: grey;
}

.page-number.active {
    font-weight: bold;
    color: blue; /* 강조 색상 */
}

.pagination-btn:hover {
    text-decoration: underline;
}

.pagination-btn[style="cursor: not-allowed;"] {
    color: grey;
}

/* 호버 시 밝기 복구 */
.recent-image:hover {
    filter: brightness(100%); /* 원래 밝기로 복구 */
}


.recent-h2 {
    padding: 0 7%;
    color: black;
}

.recent-p {
    font-size: 13px;
    padding: 0 7%;
    color: gray;
}

.recent-h1 {
    padding: 0% 7%;
    padding-top: 10%;
    color: black;
    font-size: 50px;
}


.custom-button {
    background-color: white; 
    color: black; 
    border: 2px solid transparent; 
    padding: 10px 20px; 
    width: 50%;
    font-size: 16px; 
    font-weight: bold; 
    border-radius: 15px; 
    border-color: black;
    cursor: pointer; 
    transition: background-color 0.3s ease; 
}

/* 버튼 호버 스타일 */
.custom-button:hover {
    background-color: black; 
    color: white; 
    border-color: white; 
    
}

/* 버튼 클릭 시 스타일 */
.custom-button:active {
    background-color: purple; /* 클릭 상태 색상 */
}

 /* 모달 스타일 */
 .modal {
    display: none; /* 기본적으로 숨김 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal img {
    max-width: 90%;
    max-height: 90%;
    border: 3px solid white;
    border-radius: 10px;
}
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    color: white;
    cursor: pointer;
}

@media screen and (max-width: 430px) {
    /* 최근 작업(이미지와 텍스트) 세로로 배치 */
    .recent-image-container {
        display: grid; /* Grid 레이아웃 활성화 */
        grid-template-columns: repeat(auto-fill, minmax(160px, 3fr)); /* 최소 200px, 최대 1fr */
        gap: 5px; /* 아이템 간 간격 */
        justify-content: center; /* 그리드 자체를 가로로 중앙 정렬 */
        
    }

    /* 이미지 스타일 */
    .recent-image2 {
        width: 100%; /* 그리드 셀에 꽉 차게 */
        height: 100%; /* 모든 이미지 높이를 동일하게 고정 */
        object-fit: cover; /* 박스 안에 이미지 맞춤 */
        border-radius: 0; /* 네모난 모양 */
        margin-bottom: 10px; /* 텍스트와의 간격 */
        transition: filter 0.3s ease; /* 부드러운 전환 효과 */
        filter: brightness(70%); /* 밝기 조절 (80%로 약간 어둡게 설정) */
    }

    .recent-h2 {
        padding: 0 7%;
        color: black;
        font-size: 15px;
    }
    
    .recent-h1 {
        padding: 0% 7%;
        padding-top: 20%;
        color: black;
        font-size: 25px;
    }
}




/******** 2.갤러리 스타일 여기까지 ********/


/* 푸터 */
.work-footer {
    display: flex;
    flex-direction: column; /* 세로 배치 */
    justify-content: flex-start; /* 상단 정렬 */
    text-align: left;
    background-color: #e4e4e4;
    padding: 3px 0; /* 위아래, 양옆 여백 추가 */
    gap: 20px;
    width: 100%;
}

.work-footer-title {
    margin: 0;
    font-size: 25px;
    color: gray;
}

/* 내용 컨테이너 */
.content-wrapper {
    display: flex;
    justify-content: space-between; /* 왼쪽과 오른쪽 끝으로 배치 */
    align-items: flex-start; /* 세로로 상단 정렬 */
    padding: 2% 5%;
}

/* 왼쪽 내용 */
.left-content {
    display: flex;
    flex-direction: column; /* 텍스트 세로 배치 */
}

/* 텍스트 스타일 */
.work-footer p {
    margin: 0;
    font-size: 12px;
    color: gray;
}


.work-footer h1 {
    margin: 0;
    font-size: 25px;
    color: gray;
}


/* 오른족 내용 */
.right-content {
    display: flex;
    flex-direction: row; /* 텍스트 세로 배치 */
    padding: 0 30%;
    
}

.work-rightfooter p {
    margin: 0;
    font-size: 30px;
    color: gray;
}



/* iPhone 12 Pro 크기에 맞춘 미디어 쿼리 */
/* iPhone 12 Pro 크기에 맞춘 미디어 쿼리 */
/* iPhone 12 Pro 크기에 맞춘 미디어 쿼리 */
@media screen and (max-width: 430px) {
    .work-footer {
        display: flex;
        flex-direction: column; /* 세로 배치 */
        justify-content: flex-start; /* 상단 정렬 */
        text-align: left;
        background-color: #e4e4e4;
        padding: 3px 0%; /* 위아래, 양옆 여백 추가 */
        gap: 20px;
        width: 100%;
    }
    
    .work-footer-title {
        margin: 0;
        font-size: 25px;
        color: gray;
    }
    
    /* 내용 컨테이너 */
    .content-wrapper {
        display: flex;
        justify-content: space-between; /* 왼쪽과 오른쪽 끝으로 배치 */
        align-items: flex-start; /* 세로로 상단 정렬 */
        padding: 2% 5%;
    }
    
    /* 왼쪽 내용 */
    .left-content {
        display: flex;
        flex-direction: column; /* 텍스트 세로 배치 */
    }
    
    /* 텍스트 스타일 */
    .work-footer p {
        margin: 0;
        font-size: 15px;
        color: gray;
    }
    
    .work-footer h1 {
        margin: 0;
        font-size: 25px;
        color: gray;
    }
}