/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  header{
 margin: 0 auto;
  }
.menu ul{
  display: flex;
  list-style:none;
  gap:30px;
  text-align: right;
}
  #wrapper{
    width: 80%;
    margin: 0 auto;
    }
  .top-space {
    width: 95%;
    margin: 0 auto;
   display: flex;
   background-color: #ddd;
  }
 
  .menu {
    display: flex;
    justify-content: space-between; /* ← 左右に分ける */
    align-items: center;            /* ← 縦中央に揃える */

  }
  .menu li{
    display: flex;
  }
.intro{
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 横3列 */
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}
.intro p{
  text-align: center;
  margin: 0 auto;
}
.intro img {
  display: block;
  margin: 0 auto;
}
  h2{
    text-align:center;
    margin: 0 auto;
    margin-bottom:20px;
  }
  .portfolio-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid #ddd;
  }
  
  .portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  
  
  /* オーバーレイ（最初は透明） */
  .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(128, 128, 128, 0.7); /* 半透明の灰色 */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-size: 16px;
    text-align: center;
  }
  
  /* ホバー時に表示 */
  .portfolio-item:hover .overlay {
    opacity: 1;
  }
  
  .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 横3列 */
    gap: 20px;
    max-width: 960px;
    margin: 0 auto;
  }
  
  .portfolio-item {
    background-color: #fff;
    border: 1px solid #ddd;
    aspect-ratio: 1 / 1; /* 正方形にするポイント！ */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* トリミングして正方形にフィット */
  }
  /* 初期状態のハンバーガーエリア */
  .hamburger {
    display: none;
    cursor: pointer;
    position: fixed;       /* ← スクロールしても固定表示！ */
    top: 20px;             /* ← 上からの距離 */
    right: 20px;           /* ← 右からの距離 */
    z-index: 1000;         /* ← メニューや他の要素の上に表示 */
    transition: transform 0.4s ease;
  }
  
/* ハンバーガーアイコンを常に上に表示 */
.hamburger i {
  font-size: 24px;
  transition: transform 0.4s ease, opacity 0.4s ease;
  position: absolute;
  left: 0;
  top: 0;
}

/* 閉じるボタンは最初非表示 */
.hamburger .fa-rectangle-xmark {
  opacity: 1;
}

/* メニュー本体 */
.menu {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
/* メディアクエリの外に書く */
.hamburger.active .fa-bars {
  opacity: 1;
  transform: rotate(-180deg);
}

.hamburger.active .fa-rectangle-xmark {
  opacity: 1;
  transform: rotate(-180deg);
}

  @media screen and (max-width: 768px) {

    .hamburger {
      display: block;
    }
  
    .menu {
      position: absolute;
      top: 60px;
      left: 0;
      right: 0;
      background-color: white;
      flex-direction: column;
      align-items: center;
      display: none;
      padding: 20px;
      z-index: 999;
    }
  
    .menu.active {
      display: flex;
    }
  
    .menu ul {
      flex-direction: column;
      gap: 15px;
    }
  
    .intro {
      grid-template-columns: 1fr; /* ← 横1列にする！ */
    text-align: center;         /* ← 中央揃え（任意） */
    }
  
   
}