body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  margin: 0 auto;
  background-color: #f7f9fc;
}

header {
  padding: 20px 10px;
  text-align: center;
  margin-bottom: 40px;
  background-color: #ffffff;
  background-image: url("./asset/header.png");
  background-repeat: no-repeat;
  background-size: 100%;
  min-height: 207px;
  background-position: bottom;
  background-color: #1866cd;
}

h1 {
  color: #2c3e50;
  margin-bottom: 10px;
}

header {
  h1 {
    color: #fff;
    text-shadow: 4px 4px 5px black;
    @media (max-width: 400px) {
      font-size: 1.5rem;
      word-break: auto-phrase;
      color: #fff;
    }
  }
  p {
    color: #fff;
  }
}

.search-container {
  display: flex;
  justify-content: center;
  margin-bottom: 0px;
}

#search-box {
  width: 60%;
  padding: 12px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.3s;
}

#search-box:focus {
  border-color: #3498db;
}

.results-container {
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px auto;
  max-width: 1200px;
}

.service-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.service-card h3 {
  color: #2c3e50;
  margin-top: 0;
  margin-bottom: 10px;
}

.service-card p {
  margin-bottom: 15px;
  color: #555;
}

.category-tag {
  display: inline-block;
  background-color: #e0f2ff;
  color: #3498db;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 10px;
}

.features {
  margin-top: 10px;
  margin-bottom: 15px;
}

.features span {
  display: inline-block;
  background-color: #f1f1f1;
  padding: 3px 8px;
  border-radius: 4px;
  margin-right: 5px;
  margin-bottom: 5px;
  font-size: 12px;
  color: #555;
}

.service-link {
  display: inline-block;
  text-decoration: none;
  background-color: #3498db;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: bold;
  transition: background-color 0.3s;
}

.service-link:hover {
  background-color: #2980b9;
}

.no-results {
  text-align: center;
  grid-column: 1 / -1;
  padding: 40px;
  color: #7f8c8d;
}

#recommendtag {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* 水平方向中央寄せ */
  align-items: center; /* 垂直方向中央寄せ */
  margin-bottom: 30px;
  padding: 0px;

  li {
    cursor: pointer;
    list-style: none;
    margin: 0.2rem;
    padding: 5px;
    background-color: #2980b9;
    border-radius: 5px;
    font-size: 0.8rem;
    color: #fff;
  }
}

/**
 * service.php
*/
.servicepage {
  header2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin: 20px auto;
    max-width: 1200px;
    margin-bottom: 30px;
  }

  .linkurl a {
    text-decoration: none;
    color: #3498db;
    display: inline-block;
    align-items: center;
    font-weight: bold;
    font-size: 12px;
    border: 1px solid #3498db;
    border-radius: 10px;
    padding: 0.5rem;
  }
  .back-button {
    text-decoration: none;
    color: #3498db;
    display: flex;
    align-items: center;
    font-weight: bold;
  }

  .back-button:hover {
    text-decoration: underline;
  }

  .service-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    max-width: 1200px;
    text-align: center;
  }

  #service-detail h1 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 2.2em;
  }

  .category-tag {
    display: inline-block;
    background-color: #e0f2ff;
    color: #3498db;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 20px;
  }

  .description {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: #444;
    text-align: center;
    img {
      max-width: 600px;
      width: 100%;
      display: inline-block;
    }
  }

  .review {
    font-size: 1.1em;
    font-weight: bold;
    color: #2c3e50;
    margin: 30px auto;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    display: inline-block;
  }

  .features-section h2 {
    color: #2c3e50;
    margin-bottom: 15px;
  }

  .features-list {
    list-style-type: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
  }

  .feature-item {
    background-color: #f1f1f1;
    padding: 8px 15px;
    border-radius: 6px;
    color: #555;
    font-size: 0.95em;
  }

  .error-message {
    text-align: center;
    padding: 50px 20px;
    color: #7f8c8d;
  }

  .loading {
    text-align: center;
    padding: 50px 20px;
    color: #7f8c8d;
  }

  .related-services {
    margin-top: 40px;
  }

  .related-services h2 {
    color: #2c3e50;
    margin-bottom: 15px;
  }

  .related-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
  }

  .related-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    p {
      word-break: break-all;
    }
  }

  .related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  }

  .related-card h3 {
    font-size: 1.1em;
    margin-top: 0;
    margin-bottom: 8px;
  }

  .related-link {
    text-decoration: none;
    color: inherit;
  }
}

#footerarea {
  margin-top: 3rem;
  color: #fff;
  background-color: #111;
  text-align: center;
  padding: 3rem 0rem 0.5rem;
}

.currentkensuu {
  font-size: 0.9rem;
  padding: 1rem 0rem;
  text-align: center;
  line-height: 0.9rem;
}

#back-to-top {
  position: fixed; /* 画面に固定 */
  bottom: 20px; /* 下から20pxの位置 */
  right: 20px; /* 右から20pxの位置 */
  display: none; /* 最初は非表示 */
  background-color: #007bff; /* 背景色 (青) */
  color: white; /* テキスト色 (白) */
  border: none; /* 枠線なし */
  border-radius: 50%; /* 角丸 (円形) */
  padding: 15px 20px; /* 内側の余白 */
  font-size: 20px; /* フォントサイズ */
  cursor: pointer; /* カーソルをポインターに */
  opacity: 0.7; /* 少し透明に */
  transition: opacity 0.3s ease; /* ホバー時のアニメーション */
  z-index: 1000; /*他の要素より前面に出す*/
}

#back-to-top:hover {
  opacity: 1; /* ホバー時は完全に不透明に */
}

#back-to-top span {
  display: block; /* 矢印をブロック要素にして中央寄せしやすくする */
}

#adtoys {
  display: grid;
  padding: 1rem;
  max-width: 600px;
  background-color: #fff;
  margin: 2rem auto;

  a.item {
    display: grid;
    width: 100%;
    grid-template-columns: 0.5fr 1fr 5fr;
    font-size: 1rem;
    justify-content: center;
    align-items: center;

    text-decoration: none;
    span {
      padding: 0.5rem;
      font-size: 0.8rem;
      color: #999;
      max-width: 15px;
      max-height: 15px;
    }
    p {
    }
    img {
      max-width: 50px;
    }
  }
}

.souryou,
.siharai {
  margin: 0.5rem;
  padding: 0.5rem 0rem;
  background-color: inherit;
  li.item {
    text-decoration: none;
  }
}

.service-image {
  max-width: 500px;
  width: 100%;
}

.counter {
  max-width: 320px;
  margin: 0.5rem auto;
  display: flex;
  align-items: center;
  gap: 4px;
  /* 数字間の間隔 */
  padding: 4px;
  background-color: #545c68;
  /* 濃い背景色 */
  border-radius: 8px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
  /* 影 */
  font-family: "Arial Black", sans-serif;
  /* カクカクしたフォント */
  justify-content: center;
}

.counter-digit {
  width: 24px;
  /* 数字の幅 */
  height: 36px;
  /* 数字の高さ */
  background-color: #333;
  /* 少し明るい背景 */
  color: #00ff00;
  /* 緑色の文字 */
  border: 2px solid #555;
  /* 濃いめの枠線 */
  border-radius: 4px;
  display: flex;
  justify-content: center;
  /* 中央揃え */
  align-items: center;
  font-size: 24px;
  /* 大きめのフォントサイズ */
  line-height: 1;
  /* 行の高さを1にする */
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  /* 内側の影 */
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  /* 文字の影 */
}

.counter-label {
  color: #eee;
  /* 薄い灰色 */
  font-size: 16px;
  margin-right: 8px;
}

.scontainer {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin: 20px auto;
  max-width: 600px;
  text-align: center;
  h2 {
    font-size: 1.5rem;
    margin: 0px auto;
  }
  ul {
    li {
      list-style: none;
    }
  }
  a,
  a:visited {
    text-decoration: none;
    color: rgb(46, 39, 143);
  }
  a:hover {
    text-decoration: underline;
  }
}

.pagecontents {
  max-width: 800px;
  margin: 0px auto;
  text-align: left;
  overflow: scroll;

  /* --- Striped Modern Table --- */
  table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 0.9em;
    font-family: "Arial", sans-serif; /* フォント指定 */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.12);
    overflow-x: auto; /* 内容がはみ出した場合に横スクロールバーを表示 */
    -webkit-overflow-scrolling: touch; /* iOSでの慣性スクロールを有効に */
  }

  /* テーブルヘッダー */
  table thead tr {
    background-color: #007bff; /* ヘッダー背景色 (ブルー) */
    color: #ffffff; /* ヘッダー文字色 (白) */
    text-align: left;
    font-weight: bold;
  }

  /* セル (ヘッダー & データ) */
  table th,
  table td {
    padding: 12px 15px;
  }

  /* テーブルボディの行 */
  table tbody tr {
    border-bottom: 1px solid #dddddd; /* 行の下境界線 */
  }

  /* 奇数行の背景色 */
  table tbody tr:nth-of-type(odd) {
    background-color: #f9f9f9; /* 薄いグレー */
  }

  /* 最後の行の下境界線 */
  table tbody tr:last-of-type {
    border-bottom: 2px solid #007bff; /* ヘッダー色に合わせた太い線 */
  }

  /* ホバーエフェクト */
  table tbody tr:hover {
    background-color: #e9ecef; /* やや濃いグレー */
    color: #007bff; /* 文字色をテーマカラーに */
    font-weight: bold; /* 少し強調 */
    cursor: pointer;
  }

  h2, h3 {
    border-left: 6px solid #6c63ff;
    padding-left: 0.5rem;
    background-color: #efefff;
    margin-top: 2rem;
  }

  h2 {
    font-size: 1.8rem;
    color: #4b44d1;
  }

  h3 {
    font-size: 1.4rem;
    color: #5a51e2;
  }

  ul {
    margin: 1rem 0;
    padding-left: 1.2rem;
  }

  ul li {
    list-style-type: "✨ ";
    margin-bottom: 0.5rem;
  }

  p {
    margin: 1rem 0;
  }

  hr {
    border: none;
    border-top: 1px dashed #aaa;
    margin: 2rem 0;
  }

  .highlight {
    font-weight: bold;
    color: #cc0000;
  }

  .footer {
    text-align: center;
    font-size: 1.1em;
    margin-top: 3rem;
    color: #6c63ff;
  }
  img{
    width: 100%;
    padding: 1rem;
  }
}
