body, html {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    scroll-behavior: smooth; /* 부드러운 스크롤 */
}

/* 헤더 스타일 */
.header {
    background-color: #00264d;
    color: white;
    padding: 20px 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    border-bottom: 5px solid #004080;
    animation: fadeInDown 1s ease-in-out;
}

@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 홈 버튼 스타일 */
.home-logo {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 60px;
    height: 60px;
    background-color: white;
    border: 2px solid #ddd;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.home-logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.home-logo:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* 헤더 제목 스타일 */
.header h1 {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* 내비게이션 스타일 */
.header nav {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.nav-link {
    text-decoration: none;
    color: #ffffff;
    font-size: 1.2em;
    font-weight: 600;
    transition: color 0.3s, background-color 0.3s;
    padding: 5px 10px;
    border-radius: 5px;
}

.nav-link:hover {
    color: #b3cce6;
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-link.active {
    background-color: #b3cce6;
    color: #00264d;
    text-decoration: underline;
}

/* 메인 섹션 */
main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 10px;
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 갤러리 섹션 */
.gallery-section {
    padding: 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.gallery-section h2 {
    font-size: 2em;
    color: #00264d;
    margin-bottom: 20px;
    text-transform: capitalize;
    animation: fadeInUp 1s ease-in-out;
}

.gallery-section p {
    font-size: 1.2em;
    color: #555;
    margin-bottom: 30px;
    line-height: 1.8;
    animation: fadeInUp 1.2s ease-in-out;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 갤러리 컨테이너 */
.gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
}

/* 갤러리 아이템 */
.gallery-item {
    flex: 1 1 calc(20% - 20px); /* 한 줄에 최대 5개 */
    max-width: calc(20% - 20px);
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
    background-color: #ffffff;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 2px solid #ddd;
}

.gallery-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.gallery-item figcaption {
    padding: 10px;
    font-size: 1em;
    color: #555;
    font-weight: bold;
    text-transform: capitalize;
}

/* 버튼 */
.button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #004080;
    color: white;
    font-size: 1em;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 20px;
    transition: background-color 0.3s, transform 0.2s;
}

.button:hover {
    background-color: #00264d;
    transform: translateY(-3px);
}

/* 푸터 */
footer {
    background-color: #00264d;
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 0.9em;
    margin-top: 30px;
    border-top: 4px solid #b3cce6;
    animation: fadeInUp 1.5s ease-in-out;
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
    .gallery-item {
        flex: 1 1 calc(25% - 20px); /* 한 줄에 4개 */
    }

    .nav-link {
        font-size: 1em;
    }
}

@media (max-width: 768px) {
    .gallery-item {
        flex: 1 1 calc(33.33% - 20px); /* 한 줄에 3개 */
    }

    .gallery-section h2 {
        font-size: 1.8em;
    }

    .gallery-section p {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .gallery-item {
        flex: 1 1 calc(50% - 20px); /* 한 줄에 2개 */
    }

    .gallery-section h2 {
        font-size: 1.5em;
    }

    .gallery-section p {
        font-size: 0.9em;
    }

    .nav-link {
        font-size: 0.9em;
    }
}
