/* =======================================
 * 갤러리 페이지 공통 제목 스타일
 * ======================================= */
.page-title-section {
    padding: 80px 20px 40px;
    background-color: #f8fafc;
    text-align: center;
    border-bottom: 2px solid #e2e8f0;
}

.page-title {
    font-size: 2rem; /* 모바일에서 더 작게 */
    font-weight: 800;
    color: #1e3a8a;
    margin-bottom: 10px;
    letter-spacing: -0.05em;
}

.page-subtitle {
    font-size: 1rem; /* 모바일에서 더 작게 */
    color: #475569;
    font-weight: 400;
}

/* =======================================
 * 이미지 그리드 레이아웃
 * ======================================= */
.gallery-section {
    padding: 40px 15px; /* 모바일 패딩 조정 */
    background-color: #ffffff;
}

.image-grid {
    display: grid;
    /* 모바일: 1열 고정 (auto-fit 문제 해결) */
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    background-color: #f1f5f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    /* 모바일에서 최소 높이 보장 */
    min-height: 200px;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: auto; /* 모바일에서 비율 유지 */
    min-height: 200px; /* 최소 높이 설정 */
    max-height: 400px; /* 최대 높이 제한 */
    object-fit: cover;
    display: block;
}

/* =======================================
 * 반응형 디자인
 * ======================================= */

/* 작은 스마트폰 (480px 이상) */
@media (min-width: 480px) {
    .page-title {
        font-size: 2.2rem;
    }
    
    .gallery-item img {
        height: 250px;
    }
}

/* 태블릿 (768px 이상) - 한 줄에 2개 */
@media (min-width: 768px) {
    .page-title {
        font-size: 2.5rem;
    }
    
    .page-subtitle {
        font-size: 1.1rem;
    }
    
    .gallery-section {
        padding: 60px 20px;
    }
    
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .gallery-item img {
        height: 280px;
    }
}

/* 데스크톱 (1024px 이상) - 한 줄에 3개 */
@media (min-width: 1024px) {
    .image-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    .gallery-item img {
        height: 300px;
    }
}

/* 네비게이션에 갤러리 링크 스타일 추가 */
.navigation .current-page {
    font-weight: bold;
    color: #60a5fa;
    border-bottom: 2px solid #60a5fa;
}
