* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: sans-serif;
  padding: 20px;
  background: #fff;
}

.card-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  width: 300px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.card img {
  width: 100%;
  height: auto;
}

.card-text {
  padding: 15px;
  max-height: 4.5em; /* 約3行分 */
  overflow: hidden;
  position: relative;
  transition: max-height 0.3s ease;
}

.card-text.expanded {
  max-height: 1000px; /* 展開時 */
}

.read-more {
  display: block;
  color: #007BFF;
  cursor: pointer;
  padding: 10px 15px;
  font-weight: bold;
}

@media (max-width: 768px) {
  .card-container {
    flex-direction: column;
    align-items: center;
  }
}
