/* Media Gallery Section Style */ .media-gallery-section { width: 100%; } .gallery-grid { display: grid; grid-template-columns: repeat(var(--grid-columns, 4), 1fr); gap: 2px; list-style: none; padding: 0; margin: 0; } .gallery-item { position: relative; overflow: hidden; padding-top: 100%; /* 기본값: 정사각형 비율 */ } .gallery-item a { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block; text-decoration: none; } .gallery-image, .gallery-image img { width: 100%; height: 100%; object-fit: cover; } .gallery-caption { position: absolute; bottom: 0; left: 0; width: 100%; padding: 20px 15px; background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%); color: #fff; } .gallery-caption h3 { margin: 0; font-size: 1rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* 💡 [핵심 추가] 1x1 그리드일 때만 적용되는 특별 스타일 */ .is-single-item .gallery-item { padding-top: 0; /* 정사각형 비율 해제 */ height: 250px; /* 높이 250px로 고정 */ } .empty-gallery { grid-column: 1 / -1; text-align: center; padding: 50px; }