/*
Theme Name: ToolNest Mp
Theme URI: https://example.com/
Author: あなたの名前
Description: ToolNest Mp用のテーマ
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: emptytheme
*/

/* ====================== 固定ページ・投稿ページ用 ====================== */

html, body {
   font-size: 16px;
   color: rgb(51, 51, 51);
   font-family: "ヒラギノ角ゴ ProN", "Hiragino Kaku Gothic ProN", "メイリオ", Meiryo, "ＭＳ Ｐゴシック", "MS PGothic", sans-serif;
}

/* フッターを下部に固定する措置も入っているのでむやみにいじらない */
#main-content {
  width: 100%;
  margin: 0 auto;      /* 中央寄せ */
  flex: 1;             /* Sticky Footer用 */
  padding: 0 20px;     /* ←左右に余白を確保（スマホ表示時余白ができて横スクロールが発生する） */
  box-sizing: border-box; /* ←paddingを含めても幅がはみ出さない（スマホ表示時余白ができて横スクロールが発生する） */
}

@media (max-width: 768px) {
  #main-content {
    padding: 0 10px; /* 左右に余白をつける */
  }
}


#main-content-full {
  width: 100%;
}

/* テキストの中央寄せ */
.center-text {
  text-align: center;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 18px;
  margin: 20px;
}

/* ====================== 固定ページ用（利用規約、問い合わせ等） ====================== */

/* 固定ページの利用規約やお問い合わせページにSNSボタンは不要 */
main.page-id-17 .addtoany_content_bottom,
main.page-id-21 .addtoany_content_bottom,
main.page-id-27 .addtoany_content_bottom,
main.page-id-33 .addtoany_content_bottom,
main.page-id-92 .addtoany_content_bottom,
main.page-id-123 .addtoany_content_bottom,
main.page-id-125 .addtoany_content_bottom,
main.page-id-127 .addtoany_content_bottom,
main.page-id-3 .addtoany_content_bottom,
main.page-id-23 .addtoany_content_bottom,
main.page-id-29 .addtoany_content_bottom,
main.page-id-39 .addtoany_content_bottom,
main.page-id-19 .addtoany_content_bottom,
main.page-id-25 .addtoany_content_bottom,
main.page-id-31 .addtoany_content_bottom,
main.page-id-37 .addtoany_content_bottom
 {
  display: none;
}


h2.fixed_page_title {
  max-width: 1280px;
  color: #2c2b2b;
  margin: 0 auto;
  padding: 2em 1em 0.7em 1em;
  font-size: 1.5em;
  text-align: center;
  font-weight: normal;
  border-bottom: 1px solid #2c2b2b;
  font-weight: bold;
}

.fixed_page_contact {
  max-width: 800px;
  margin: 0 auto;      /* 左右の余白を自動にして中央寄せ */
  padding-top: 1em;
  padding-bottom: 2em;
}


.guide-page {
  max-width: 800px;
  margin: 40px auto;
  padding: 20px 30px;
  background: #fdfdfd;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.8;
  color: #333;
}

.guide-page h1 {
  font-size: 2em;
  margin-bottom: 0.5em;
  color: #2c3e50;
  border-bottom: 2px solid #3498db;
  padding-bottom: 0.3em;
}

.guide-page h3 {
  font-size: 1.5em;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  color: #34495e;
}

.guide-page p {
  margin-bottom: 1em;
}

.guide-page ul {
  margin: 0 0 1.5em 1.2em;
  padding: 0;
}

.guide-page li {
  margin-bottom: 0.6em;
  list-style-type: disc;
}

.guide-page strong {
  color: #2980b9;
}

.guide-page hr {
  border: none;
  border-top: 1px solid #ccc;
  margin: 2em 0;
}

.guide-page .credit {
  text-align: right;
  font-size: 1.4em;
  font-weight: normal;
  color: #333;
  margin-top: 2.5em;
  letter-spacing: 1px;
  font-family: "Yu Mincho", "Hiragino Mincho Pro", "MS Mincho", serif;
}


/* ====================== トップページ・ツール一覧 ====================== */
.tool-card {
  flex: 1 1 auto;
  max-width: 100%;
}

.tool-icon {
  width: 128px;
  height: 128px;
  margin-bottom: 12px;
  background: #e6f0ff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center; /* 中央寄せ */
}

.tool-icon img {
  max-width: 95%;   /* 枠の中で収まるように */
  max-height: 95%;
  object-fit: contain;
}

@media (max-width: 768px) {
  .tool-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
  }
  .tool-card {
    padding: 12px;
  }

  .tool-icon {
    width: 96px;
    height: 96px;
  }
  .tool-icon img {
    max-width: 90%;
    max-height: 90%;
  }

}
/* ====================== header ====================== */

/* 2025.12.26 ロゴ使わなくなったので現在は使われていない */
.header-logo .custom-logo {
    max-width: 150px; /* ヘッダーのロゴだけ小さく */
    height: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #fff;
  border-bottom: 1px solid #e6e9ef;
  position: sticky;
  top: 0;
  z-index: 10;
}


/* ヘッダー左上のサイト名 */
.site-brand {
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #1b3f8b;;
}

/* ヘッダー左上のサイト名の色決め */
a.site-title {
  text-decoration: none;   /* 下線を消す */
  color: #1b3f8b;          /* 通常リンク色 */
}
a.site-title:visited {
  color: #1b3f8b;          /* 訪問済みリンクも同じ色 */
}
a.site-title:hover,
a.site-title:active {
  color: #1b3f8b;          /* ホバーやクリック中も同じ色 */
}

/* ヘッダー右上のリンク */
.header-nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 1;
}

/* 言語切り替えセレクトボックス */
.language-selector {
  display: flex;
  align-items: center;
  order: -1;  /* セレクトボックスを最初に配置 */
}

.language-selector select {
  padding: 8px 12px;
  border: 1px solid #e6e9ef;
  border-radius: 6px;
  background-color: #fff;
  color: #5b6270;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.3s, background-color 0.3s;
  font-family: inherit;
  white-space: nowrap;
}

.language-selector select:hover,
.language-selector select:focus {
  border-color: #1b3f8b;
  background-color: #f0f4ff;
  outline: none;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
  margin: 0; padding: 0;
}
.site-nav a {
  color: #5b6270;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
}
.site-nav a[aria-current="page"],
.site-nav a:hover,
.site-nav a:focus-visible {
  color: #1b3f8b;
  background: #f0f4ff;
  outline: none;
}

/* スマホサイズのとき、言語セレクタは表示、ナビゲーションメニューは非表示 */
@media screen and (max-width: 768px) {
  .header-nav-wrapper {
    flex-direction: row;
    gap: 12px;
    width: auto;
    justify-content: flex-end;
  }
  
  .language-selector {
    order: -1;
  }
  
  .language-selector select {
    width: auto;
  }
  
  .site-nav {
    display: none;
    margin-left: 0;
  }
}

/* ====================== footer ====================== */

/* これらはコンテンツの高さが足りない時もフッターをブラウザの一番したに固定するために必要 */
html, body {
  height: 100%;
  margin: 0;
}

.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  align-items: stretch; /* ←中央寄せ防止、幅いっぱいに広げる */
}

.site-footer {
  margin-top: auto; /* フッターを最下部に配置 */
}
/* 上段バー（背景は全幅） */
.footer-bar {
    background-color: #28598f;
    border-top: 3px solid #000;
}

/* 内側コンテナ：中央寄せ＆横並び */
.footer-inner {
    max-width: 1150px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 左側：サイト名 */
.footer-left .footer-brand {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    font-weight: 700;
}

/* 右側：リンク群 */
.footer-right .footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 22px;
}
.footer-right .footer-links a {
    font-size: 13px;
    color: #ccc;
    text-decoration: none;
    padding-left: 14px;
    position: relative;
}
.footer-right .footer-links a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    border-left: 6px solid #999;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

/* コピーライト帯（全幅黒背景） */
.footer-copyright {
    font-size: 12px;
    width: 100%;
    height: 40px;
    line-height: 40px;
    background: #222;
    text-align: center;
    color: #aaa;
    margin: 0;
    padding: 0;
}
.footer-copyright p {
    margin: 0;
}
.custom-logo {
    max-width: 80%;
    height: auto;
}

/* スマホ対応：縦並び */
@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .footer-right .footer-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin: 0px 15px 10px 20px;
    }
    .custom-logo {
        max-width: 60%;
        height: auto;
    }
}


/* ===============================
   画面右下に出す画面上部に戻るボタン
   =============================== */
#scrollTopBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  background: linear-gradient(135deg, #1e90ff, #0066cc);
  color: #fff;
  border: none;
  padding: 14px;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: transform 0.2s, background 0.3s;
  border-radius: 6px;
}
#scrollTopBtn:hover {
  background: linear-gradient(135deg, #3399ff, #004c99);
  transform: translateY(-3px);
}
#scrollTopBtn svg {
  width: 20px;
  height: 20px;
  fill: white;
  display: block;
  margin: auto;
}
