/* 페이지 제목 스타일 */
.page-title {
    text-align: center;
    font-size: 24px;
    margin-top: 20px;
    font-weight: bold;
}

/* 서브메뉴 컨테이너 */
.submenu-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

/* 서브메뉴 버튼 기본 스타일 */
.submenu-button {
    color: black;
    border: 2px solid #555;
    padding: 10px 20px;
    margin: 0 10px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 10px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* 서브메뉴 버튼에 마우스를 올렸을 때 */
.submenu-button:hover {
    background-color: #ffeded;
    border-color: #a80000;
}



/* 이미지 그리드 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 그리드 칸 너비 300px */
    gap: 16px;
    justify-items: center;
    padding: 0 20px;
    max-width: 1000px;
    margin: 0 auto;
}

/* 그리드 아이템 */
.grid-item {
    text-align: center;
}

.grid-item img {
    width: 100%;
    width: 300px; /* 이미지 최대 너비 */
    height: 280px; /* 이미지 높이 */
    border: solid black;
}

.grid-item a {
    text-decoration: none;
    color: #111;
    font-weight: bold;
    display: block;
}
.grid-item .title {
    color: #333; /* 너무 진한 검정색 대신 짙은 회색으로 설정 */
    font-size: 20px; /* 폰트 크기를 조금 더 크게 설정 */
    font-weight: 600; /* 폰트 두께를 600으로 설정해 조금 더 고급스러운 느낌 */
    text-align: left; /* 텍스트를 왼쪽 정렬 */
    font-family: 'Noto Sans', Arial, sans-serif;
    letter-spacing: 0.5px; /* 글자 간격을 약간 넓혀 더 세련된 느낌 */
    line-height: 1.4; /* 줄 간격을 넓혀 가독성 향상 */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1); /* 텍스트에 미세한 그림자 추가 */
    transition: color 0.3s ease; /* 색상이 부드럽게 변화하도록 설정 */

}

.grid-item .title:hover {
    color: #555; /* 호버 시 약간 더 어두운 회색으로 변경 */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2); /* 호버 시 그림자를 조금 더 진하게 */
}


/* Aside (좌우 여백을 위한 스타일) */
aside {
    width: 150px;
    margin: 0 20px;
    display: inline-block;
    vertical-align: top;
}

/* 페이징 스타일 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    list-style-type: none;
    padding: 0;
}

.pagination li {
    margin: 0 5px;
}

.pagination a,
.pagination strong {
    display: block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    text-decoration: none;
    border-radius: 50%;
    background-color: #ffffff;
    color: #3f3f3f;
    font-weight: bold;
    border: 2px solid #ccc;
    transition: background-color 0.3s, border-color 0.3s;
}

.pagination a:hover {
    background-color: #f2dbff;
    color: #000000;
    border-color: #000000;
}

.pagination strong {
    background-color: #000000;
    color: #ffffff;
    border-color: #797979;
}

/* 서브메뉴 버튼 기본 스타일 */
/* 서브메뉴 버튼 기본 스타일 */

.submenu-container {
    display: flex; /* Use flexbox for horizontal layout */
    overflow-x: auto; /* Allow horizontal scrolling */
    overflow-y: hidden; /* Hide vertical overflow */
    padding: 10px 0; /* Vertical padding */
    width: 100%; /* Full width */
    position: relative; /* For relative positioning if needed */
    scrollbar-width: none; /* Firefox: hide scrollbar */
    white-space: nowrap; /* Prevent wrapping of buttons */

}
.submenu-button {
    color: black; /* 텍스트 색상을 검은색으로 변경 */
    background-color: rgba(255, 255, 255, 0.5); /* 배경을 반투명하게 설정 */
    border: 1px solid black; /* 테두리를 검은색으로 설정 */
    padding: 8px 16px; /* 버튼 패딩을 작게 설정 */
    margin: 0 10px; /* 버튼 간 간격 */
    text-decoration: none; /* a 태그의 기본 밑줄 제거 */
    border-radius: 5px; /* 버튼 모서리 둥글게 */
    font-size: 12px; /* 텍스트 크기를 작게 설정 */
    font-weight: normal; /* 텍스트 두께를 기본 값으로 */
    display: inline-block;
    position: relative; /* 애니메이션을 위한 상대적인 위치 */
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.submenu-button:first-child {
    margin-left: 10px; /* Add left margin for the first button */
}
.submenu-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera: hide scrollbar */
}

/* 가상 요소를 사용하여 아래에 선 추가 (처음에는 숨김) */
.submenu-button::after {
    content: '';
    position: absolute;
    width: 0; /* 초기 너비를 0으로 설정 */
    height: 1.5px; /* 선의 두께 */
    bottom: 0;
    left: 0;
    color : #5b4e4e;
    background-color: #5b4e4e; /* 선의 색상 */
    transition: width 0.4s ease-out; /* 애니메이션 속도 및 유형 */
}

/* 서브메뉴 버튼에 마우스를 올렸을 때 */
.submenu-button:hover {
    background-color: rgba(255, 255, 255, 0.8); /* 마우스 올렸을 때 투명도를 조금 더 줄임 */
    color: #5b4e4e; /* 텍스트 색상 검은색 */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* 버튼에 약간의 그림자 추가 */
}

.submenu-button:hover::after {
    width: 100%; /* 선의 너비를 전체로 확장 */
}

/* 활성화된 서브메뉴 버튼 스타일 */
.submenu-button.active {
    background-color: rgba(255, 255, 255, 0.7); /* 활성화된 버튼 배경 투명도 설정 */
    color: #5b4e4e; /* 텍스트 색상 검은색 */
    border-color: #5b4e4e; /* 테두리 색상 검은색 */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* 활성화된 버튼에도 약간의 그림자 */
    text-decoration: underline; /* 밑줄 추가 */

}



@media (max-width: 768px) {
    .submenu-container {
        display: flex;
        justify-content: center;
        margin: 20px 0;
    }

    .image-grid {
        grid-template-columns: repeat(2, 1fr); /* 한 줄에 2개의 칸 */
    }

    .grid-item img {
        width: 100%; /* 이미지 크기 조정 */
        height : 200px;
    }
}