/* 공통 컨테이너 */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 헤더 스타일 */
.library-header {
    text-align: center;
    margin-bottom: 40px;
}
.library-header h1 { font-size: 2.5rem; color: #333; margin-bottom: 10px; }
.library-header p { color: #888; font-size: 1.1rem; }

/* 카테고리 칩 버튼 */
.category-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}
.chip {
    padding: 10px 22px;
    background: #f0f2f5;
    border-radius: 30px;
    text-decoration: none;
    color: #555;
    font-weight: 600;
    transition: all 0.3s ease;
}
.chip.active, .chip:hover {
    background: #3b82f6;
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* 그리드 레이아웃 */
.doan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* 카드 디자인 */
.doan-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.doan-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.12);
}
.doan-card a { text-decoration: none; color: inherit; }

/* 카드 이미지 섹션 */
.card-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.doan-card:hover .card-image img { transform: scale(1.05); }

.view-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* 카드 텍스트 섹션 */
.card-body { padding: 20px; }
.category-label {
    display: inline-block;
    color: #3b82f6;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
}
.card-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: #222;
    line-height: 1.4;
}
.card-text {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 카드 푸터 */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
    font-size: 0.85rem;
    color: #999;
}
.read-more { color: #3b82f6; font-weight: 600; }