/* ==========================================
   루나소나타 피아노 스튜디오 레슨 소식 게시판 스타일
========================================== */

/* 전체 컨테이너 정렬 */
.piano-custom-board-container {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    font-family: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
}

/* 1. 게시판 헤더 타이틀 영역 */
.board-header {
    text-align: center;
    margin-bottom: 50px;
}

.board-title {
    font-size: 2.6rem;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

.board-subtitle {
    font-size: 1.05rem;
    color: #777;
    margin-bottom: 40px;
}

/* 카테고리 필터 탭 */
.filter-tab-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-btn {
    background-color: #fdfdfd;
    color: #555;
    border: 1px solid #e8e6e1;
    padding: 12px 26px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.01);
}

.filter-btn:hover {
    background-color: #f7f5f0;
    border-color: #c5bfae;
    color: #111;
}

.filter-btn.active {
    background-color: #222;
    border-color: #222;
    color: #fff;
    box-shadow: 0 4px 15px rgba(34,34,34,0.2);
}

/* 2. 피아노 소식 카드 그리드 레이아웃 (3열 배치) */
.piano-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
    margin-top: 20px;
    transition: all 0.4s ease;
}

/* 카드 개별 아이템 */
.piano-card-item {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.04);
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.5s ease, opacity 0.4s ease, transform 0.4s ease;
    opacity: 1;
    transform: scale(1);
}

/* 자바스크립트 필터링으로 인해 숨겨지는 카드 클래스 */
.piano-card-item.is-hidden {
    display: none;
    opacity: 0;
    transform: scale(0.9);
}

/* 카드 마우스 호버 애니메이션 효과 */
.piano-card-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 35px rgba(197, 191, 174, 0.25);
}

.card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 카드 이미지 박스 (비율 유지) */
.card-image-box {
    position: relative;
    width: 100%;
    padding-top: 62.5%; /* 16:10 비율 */
    overflow: hidden;
    background-color: #f7f5f0;
}

.card-image-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

/* 마우스 호버 시 이미지 확대 효과 */
.piano-card-item:hover .card-image-box img {
    transform: scale(1.06);
}

/* 카테고리 뱃지 라벨 */
.card-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    background: rgba(255, 255, 255, 0.85);
    color: #444;
    padding: 5px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* 카드 텍스트 콘텐츠 박스 */
.card-content-box {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-date {
    font-size: 0.82rem;
    color: #b0aba0;
    margin-bottom: 12px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.45;
    margin: 0 0 14px 0;
}

.card-title a {
    color: #222;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: #8c836e; /* 루나소나타 브랜드 시그니처 골드/브라운 */
}

/* 본문 요약문 3줄 제한 처리 */
.card-excerpt {
    font-size: 0.92rem;
    color: #666;
    line-height: 1.65;
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 자세히 보기 버튼 스타일 */
.card-readmore-btn {
    margin-top: auto;
    font-size: 0.88rem;
    font-weight: 600;
    color: #222;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
}

/* 화살표 가상 요소 기입 */
.card-readmore-btn::after {
    content: '\2192';
    margin-left: 5px;
    display: inline-block;
    transition: transform 0.3s ease;
}

/* 카드 호버 시 화살표 이동 애니메이션 */
.piano-card-item:hover .card-readmore-btn::after {
    transform: translateX(5px);
}

.piano-card-item:hover .card-readmore-btn {
    color: #8c836e;
}

/* 게시글이 없을 때 출력 문구 */
.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 100px 0;
    color: #a0a0a0;
    font-size: 1.1rem;
}

/* 반응형 모바일 브레이크 포인트 조절 */
@media (max-width: 1024px) {
    .piano-card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    .board-title { font-size: 2.2rem; }
}

@media (max-width: 640px) {
    .piano-card-grid {
        grid-template-columns: 1fr;
    }
    .piano-custom-board-container { margin: 40px auto; }
    .filter-tab-container { gap: 8px; }
    .filter-btn { padding: 10px 20px; font-size: 0.88rem; }
}