/* style.css */
@charset "utf-8";

/* 전체 컨테이너 */
.lat { 
    position: relative; 
    margin-bottom: 20px; 
    background: #fff; 
    text-align: center; 
}

/* ul : flex로 5개 가로 정렬 + 자동 줄바꿈 */
.lat ul { 
    padding: 10px 0; 
    list-style: none; 
    margin: 0; 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 20px; 
    position: relative; 
    min-height: 260px; /* 전환 중 레이아웃 흔들림 방지 */
}

/* 개별 아이템 : 기본 숨김 + 페이드/슬라이드 전환 준비 */
.lat .item { 
    display: none; 
    width: 170px; 
    opacity: 0; 
    transition: opacity 0.3s ease, transform 0.3s ease; 
    position: absolute; 
    transform: translateY(10px); 
}

/* 활성화된 아이템 : 보이면서 선명해짐 */
.lat .item.active { 
    display: block; 
    opacity: 1; 
    transform: translateY(0); 
    position: static; 
}

/* 제목 링크 스타일 */
.lat a { 
    color: #000; 
    text-decoration: none; 
    font-weight: bold; 
    font-size: 1.1em; 
    display: block; 
    margin-top: 8px; 
}
.lat a:hover { color: #3a8afd; }

/* 썸네일 감싸는 박스 */
.thumb-wrap { 
    display: inline-block; 
    margin: 0 auto 8px; 
    transition: box-shadow 0.28s ease; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); 
    border-radius: 8px; 
    overflow: hidden; 
    transition: transform 0.35s ease, box-shadow 0.28s ease; 
}
.thumb-wrap:hover { 
    box-shadow: 0 10px 20px rgba(0,0,0,0.18); 
    animation: float 1.25s ease-in-out infinite; 
}
@keyframes float { 
    0%, 100% { transform: translateY(-5px); } 
    50% { transform: translateY(-12px); } 
}

/* 이미지 : 로드 전에는 투명, 로드 후 페이드인 */
.thumb-wrap img { 
    width: 170px; 
    height: auto; 
    display: block; 
    opacity: 0; 
    transition: opacity 0.4s ease; 
}
.thumb-wrap img.loaded { opacity: 1; }