@import url("common.css");

body {
  margin-bottom: 2rem;
}

main {
  width: 100%;
  box-sizing: border-box;
  max-width: 1280px; /* 最大幅を設定し中央寄せ */
}

h1 {
  margin-left:0 0px;
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 0rem;
}

h2 {
  font-weight: 400;
  line-height: 1rem;
  margin-bottom: 1rem;
  margin-top: 1rem;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4列均等幅 */
  gap: 2rem;
  margin: 0 auto; /* グリッド自体を中央寄せ */
  max-width: 1280px; /* 全体の最大幅制限 */
  box-sizing: border-box;
  
}

.works-section{
  margin-bottom: 3rem;
}

.work-card {
  display: flex;
  flex-direction: column;
}

.work-card:hover {
  color: gainsboro;
}

.work-card:hover .work-info h3,
.work-card:hover .work-info p {
  color: gainsboro;
}

.work-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.work-info {
  color: black;
  padding: 0;
}

.work-info h3 {
  font-size: 1rem;
  font-weight: 400;
}

.work-info p {
  font-size: 0.8rem;
  margin: 0;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.work-link img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 1 / 1; /* 正方形 */
  /*margin-bottom: 0rem;  画像下に余白 */
}


footer {
  text-align: center;
  font-size: 0.9rem;
  color: #555;
  padding: 1.5rem 0;
}

/* Responsive */

@media (max-width: 768px) {
  main {
    padding: 6rem 10px rem 10px; /* スマホは左右余白10px */
    max-width: 100%;
  }
  
    .top p{
    opacity: 0;
  }

  h1 {
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 0.8em;
  }

  h2 {
  font-weight: 400;
  line-height: 1rem;
  margin-bottom: 1rem;
  /*margin-top: 2rem;*/
  }

  .works-grid {
    grid-template-columns: 1fr;
    gap: 0rem;
    margin-top: 0rem;
  }

  .work-card {
    padding: 0rem;
    margin-top: 1rem;
  }

  .work-link img {
    margin-bottom: 0.5rem;
  }
}
