.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}
.fair-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}
.fair-filter {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20,50 70,100 120,50' stroke='%23666' stroke-width='10' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    background-size: 12px;
    padding: 8px 36px 8px 14px;
    font-size: 0.95rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-width: 120px;
    cursor: pointer;
}
.fair-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 24px;
}
.fair-card {
    text-align: center;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.img-wrapper {
    width: 85%;
    height: 250px;
    background-color: #f5f5f5;
    padding: 10px; /* ✅ 이미지와 배경 사이 여백 */
    box-sizing: border-box;
    margin: 0 auto;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.fair-card img:hover {
    transform: scale(1.03);
}
.fair-info {
    margin-top: auto;
    padding-top: 12px;
    text-align: center;
    min-height: 80px; /* 고정 높이 */
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.fair-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 4px 0;
}
.fair-info p {
    font-size: 0.9rem;
    color: #666;
}
.fair-more {
    text-align: center;
    margin-top: 40px;
}
.read-more {
    border: 1px solid #ccc;
    background: transparent;
    padding: 10px 20px;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
}

.no-works {
    text-align: center;
    padding: 100px 20px;
    color: #999;
    font-size: 1.1rem;
}


@media (max-width: 1033px) {
    .fair-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .img-wrapper {
        height: auto; /* ✅ 모바일에선 높이 고정 해제 */
        padding: 8px; /* 여백은 유지하거나 조절 */
    }

    .img-wrapper img {
        height: auto;
    }
}
