@charset "utf-8";

/* 섹션 5 갤러리 리스트 스킨 */
.s5-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: stretch;
}

.s5-card {
    border: 1px solid #e1e1e1;
    display: flex;
    flex-direction: column;
    background: #fff;
    height: 100%;
}

.s5-card-img {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 1px solid #e1e1e1;
}

.s5-card-text {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.s5-card-text h4 {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.s5-card-text p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 이미지가 없는 카드는 텍스트를 더 많이 보여줌 */
.s5-card.no-img .s5-card-text p {
    -webkit-line-clamp: 12;
}

@media (max-width: 1200px) {
    .s5-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

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

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