.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}

.gallery-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #f1f3f4;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.gallery-card:hover, .gallery-card.active {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: #e5e8eb;
}
.gallery-card .card-thumbnail img{
    transition: all 0.3s ease;
}
.gallery-card:hover .card-thumbnail img, .gallery-card.active .card-thumbnail img {
    filter: brightness(50%);
}

.card-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #3182f6 0%, #667eea 100%);
    position: relative;
    overflow: hidden;
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card:hover .thumbnail-overlay {
    opacity: 1;
}

.thumbnail-icon {
    width: 32px;
    height: 32px;
    color: white;
}

.card-category {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    z-index: 1;
}

.card-category.notice {
    background-color: rgba(232, 243, 255, 0.9);
    color: #3182f6;
}

.card-category.announcement {
    background-color: rgba(255, 244, 230, 0.9);
    color: #ff8800;
}

.card-category.general {
    background-color: rgba(241, 243, 244, 0.9);
    color: #4e5968;
}

.card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #191f28;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.card-description {
    font-size: 13px;
    font-weight: 400;
    color: #8b95a1;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f1f3f4;
}

.card-author {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4e5968;
    font-size: 12px;
    font-weight: 500;
}

.author-avatar {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #3182f6, #667eea);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: white;
}

.card-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #8b95a1;
    font-size: 12px;
    font-weight: 400;
}

.stat-icon {
    width: 12px;
    height: 12px;
}

.card-date {
    font-size: 12px;
    color: #8b95a1;
    margin-top: 4px;
    font-weight: 400;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.page-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid #e5e8eb;
    background: white;
    color: #4e5968;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.page-button:hover {
    background: #f8f9fa;
    border-color: #d1d6db;
}

.page-button.active {
    background: #3182f6;
    color: white;
    border-color: #3182f6;
}

.page-button.disabled {
    color: #d1d6db;
    cursor: not-allowed;
}

.page-button.disabled:hover {
    background: white;
    border-color: #e5e8eb;
}

@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .card-content {
        padding: 16px;
    }

    .search-form {
        flex-direction: column;
    }

    .tab-list {
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .card-stats {
        align-self: stretch;
        justify-content: space-between;
    }
}

/* 새로운 섬네일 배경 그라데이션 */
.card-thumbnail.bg-1 {
    background: linear-gradient(135deg, #3182f6 0%, #667eea 100%);
}
.card-thumbnail.bg-2 {
    background: linear-gradient(135deg, #ff8800 0%, #ffa726 100%);
}
.card-thumbnail.bg-3 {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}
.card-thumbnail.bg-4 {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
}
.card-thumbnail.bg-5 {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
}
.card-thumbnail.bg-6 {
    background: linear-gradient(135deg, #06b6d4 0%, #67e8f9 100%);
}
.card-thumbnail.bg-7 {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}
.card-thumbnail.bg-8 {
    background: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
}