/* =========================================
   [Gallery] Masonry Layout & Hover Effect
   ========================================= */

/* 1. 그리드 레이아웃 (벽돌 쌓기 방식) */
.gallery-grid {
    column-count: 3;        /* 데스크탑: 3열 */
    column-gap: 24px;       /* 열 사이 간격 */
}

/* 모바일 반응형 (768px 이하) */
@media (max-width: 768px) {
    .gallery-grid {
        column-count: 1;    /* 모바일: 1열 */
    }
}

/* 2. 개별 아이템 (카드) */
.gallery-item {
    break-inside: avoid;    /* 카드가 열 사이에서 잘리지 않도록 함 */
    margin-bottom: 24px;    /* 아래쪽 간격 */
}

.gallery-card {
    background-color: white;
    border-radius: 0;       /* Arte 테마처럼 각진 모서리 (원하면 px 조절) */

    border: 1px solid #eee;
    transition: box-shadow 0.3s ease;
}

.gallery-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

/* 3. 이미지 확대 효과 (Hover Zoom) */
.img-wrapper {
    overflow: hidden;       /* 필수: 이미지가 커질 때 영역 밖을 자름 */
    line-height: 0;         /* 이미지 하단 미세한 공백 제거 */
}

.img-wrapper img {
    width: 100%;            /* 가로 꽉 채우기 */
    height: auto;           /* 세로 비율 유지 */
    transition: transform 0.5s ease; /* 0.5초 동안 부드럽게 */
    display: block;
}

/* 마우스 올렸을 때 이미지 확대 */
.gallery-card:hover .img-wrapper img {
    transform: scale(1.08); /* 1.08배 확대 (살짝) */
}

/* 4. 하단 텍스트 */
.card-info {
    background-color: #fff;
    border-top: 1px solid #f9f9f9;
}

.img-name {
    font-size: 0.85rem;
    color: #555;
    font-weight: 500;
}

/* [Gallery] 추가 스타일 수정 */

/* 1. 체크박스 스타일 (우측 하단 배치) */
.gallery-card .form-check-input {
    width: 1.1em;
    height: 1.1em;
    border: 1px solid #aaa;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    z-index: 100;
}
.gallery-card .form-check-input:checked {
    background-color: #b36a5e;
    border-color: #b36a5e;
}

/* 2. 카드 정보 영역 */
.card-info {
    background-color: #fff;
    border-top: 1px solid #f0f0f0;
    padding-bottom: 35px; /* 체크박스 공간 확보를 위해 패딩 추가 */
}

/* 3. 점 세 개 버튼 호버 효과 */
.hover-effect {
    transition: color 0.2s;
}
.hover-effect:hover {
    color: #1d3557; /* 마우스 올리면 진한 남색 */
    transform: scale(1.1); /* 살짝 커짐 */
}

/* 4. 드롭다운 메뉴 스타일 */
.dropdown-item {
    cursor: pointer;
}
.dropdown-item:active {
    background-color: #f0f0f0;
    color: #333;
}

/* ... 기존 코드 아래에 추가 ... */

/* [Gallery] 상단 카테고리 필터 메뉴 */
.category-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px; /* 그리드와의 간격 */
}

.category-link {
    text-decoration: none;
    color: #666;
    font-size: 0.95rem;
    padding: 5px 8px;
    border-radius: 16px; /* 둥근 버튼 모양 */
    transition: all 0.3s ease;
    border: 1px solid transparent; /* 호버 시 흔들림 방지용 투명 테두리 */
}

/* 마우스 올렸을 때 효과 (요청하신 색상) */
.category-link:hover {
    background-color: #fbf9f7;
    color: #1d3557;
    font-weight: bold;
}

/* 현재 선택된 카테고리 강조 스타일 */
.category-link.activ {
    background-color: #c6d2de;
    color: white;
    }
