@charset "utf-8";

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.column_contents{
    flex-wrap: wrap;
    gap: 20px;
}

.content {
  display: flex;
  flex-direction: row;
  flex-wrap:wrap;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  padding: 20px;
  border-radius: 5px;
  align-items: flex-start;
  flex-basis: 50%;
  flex: calc(50% - 10px);
  /*--width: 800px;--*/ /* 枠の幅を固定 */
  min-height: 150px; /* 最小の高さを設定 */
  position: relative;
}

.content img {
  width: 200px; /* 画像の幅を固定 */
  height: 150px; /* 画像の高さを固定 */
  /*--margin-right: 20px;--*/
  margin-right: 40px;
  border-radius: 5px;
}

.content p {
  margin: 0;
  flex-grow: 1;
  /*-- width: calc(100% - 220px); --*/
  width: calc(100% - 260px); /* 画像とマージンを引いた幅を設定 */
}

.linkbox {
    position: relative;
}
.linkbox a {
    position: absolute;
    top: 0;
    left: 0;
    height:100%;
    width: 100%;
}


@media screen and (min-width:801px) and (max-width:1300px){
  .content{text-align: center;}
  .content img{margin: 0 auto;}
  .content p{width: 100%; display: block; text-align: left;}

}

@media (max-width: 800px) {
  .content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%; /* スクリーンサイズに合わせて幅を調整 */
  }

  .content img {
    margin-right: 0;
    margin-bottom: 20px;
    width: 150px; /* モバイルでの画像の幅 */
    height: 112.5px; /* モバイルでの画像の高さ、元の比率を保持 */
  }

  .content p {
    margin: 10px; /* テキストの周囲のマージンを設定 */
    width: auto; /* テキストの幅を自動に設定 */
    text-align: left;
  }
}