/* ===============================
   モバイル・タブレット：本文レイアウト
================================= */
@media (max-width: 1024px) {

  /* スマホ・タブレット共通の本文幅 */
  .entry-content .n-page-hero,
  .entry-content .n-breadcrumb,
  .entry-content .n-page-content,
  .entry-content .n-standard-page {
    width: 90%;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
  }

  /* セクションは親幅いっぱい */
  .entry-content .n-content-section {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
  }
}

/* ===============================
   スマホのみ：本文幅を3種類で統一
   767px以下
================================= */
@media (max-width: 767px) {

  .entry-content section.n-page-content,
  .entry-content .n-navi-page,
  .entry-content .n-standard-page {
    width: 85%;
    max-width: 85%;
  }

  /* 検索結果ページ（.entry-content の外にあるため個別指定） */
  .ppe-search-page .search_result .n-content-section {
    width: 85%;
    max-width: 85%;
    margin-left: auto;
    margin-right: auto;
  }

  /* 検索結果ページのタイトルを下層ページと揃える */
  .ppe-search-page .n-page-hero {
    min-height: 120px;
  }

  .ppe-search-page .n-page-hero__title {
    font-size: 20px;
  }
}

/* ===============================
   スマホのみ：テーマ側余白をリセット
================================= */
@media (max-width: 767px) {

  #content.container,
  #content .row,
  #primary.content-area,
  main.site-main,
  .entry-content {
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
  }

}

/* ===============================
   薄水色の帯タイトル
================================= */

.entry-content .n-standard-band-title {
  margin: 0 0 70px;
  padding: 10px 28px;
  background: #00B2D0;
  color: #222222;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 400;
}

/* ===============================
   最高レベルのPPE セクション専用
================================= */
.n-high-ppe-lead {
  display: flex;
  gap: 24px;
  align-items: stretch;
}

.n-high-ppe-left,
.n-high-ppe-text {
  flex: 1;
}

.n-high-ppe-images {
  display: flex;
  gap: 8px;
  width: 100%;
}

.n-high-ppe-images img {
  width: calc(50% - 4px);
  max-width: 180px;
  height: auto;
  object-fit: contain;
}

.n-high-ppe-caption {
  margin-top: 6px;
  padding: 8px;
  background: #f2f2f2;
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
}

.n-high-ppe-text p {
  margin: 0;
}

.n-red-text {
  color: #ff0000;
}

.n-high-ppe-subtitle {
  margin: 24px 0 12px;
  font-size: 16px;
  font-weight: 700;
}

/* ===============================
   推奨PPE画像グリッド
================================= */
.n-ppe-item-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.n-ppe-item {
  aspect-ratio: 1 / 1;
  background: #fff;
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.n-ppe-item img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  margin-bottom: 0;
}

.n-ppe-item span {
  text-align: center;
  font-size: 13px;
  line-height: 1.3;
}

/* ===============================
   タブレット・スマホ共通
   1024px以下
================================= */
@media (max-width: 1080px) {

  .n-site-header,
  .n-header-inner {
    background: #00B2D0;
  }

  .n-site-header::before {
    display: none;
  }

  .n-container {
    max-width: 100%;
  }

  .n-header-inner {
    display: flex;
    height: 64px;
    align-items: center;
    padding: 0 16px;
  }

  .n-logo {
    width: auto;
    flex: 0 0 auto;
    max-width: none;
    padding: 0;
    background: transparent;
    justify-content: flex-start;
  }

  .n-logo img {
    width: 150px;
    max-width: 30vw;
    height: auto;
    padding-left: 10px;
  }

  .n-header-right {
    flex: 1;
    max-width: none;
    padding: 0;
    gap: 12px;
  }

  .n-nav {
    display: none;
  }

  .n-header-search-btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  .n-header-search-popup {
    top: 58px;
    right: 16px;
    left: 16px;
  }

  .n-header-search-popup form,
  .n-header-search-popup input[type="search"] {
    width: 100%;
  }

  .n-ppe-item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* ハンバーガーボタン */
  .n-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    position: relative;
    z-index: 10000;
  }

  .n-menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    margin: 0 auto;
    background: #fff;
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
  }

  .n-menu-toggle.is-open span {
    background: #fff;
  }

  .n-menu-toggle.is-open span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }

  .n-menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .n-menu-toggle.is-open span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  /* スマホメニュー */
  .n-sp-menu {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(100vh - 80px);
    padding: 38px 40px 80px;
    background: #fff;
    z-index: 9998;
    box-shadow: none;
    overflow-y: auto;
    box-sizing: border-box;
  }

  .n-sp-menu.is-open {
    display: block;
  }

  .n-sp-menu .n-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .n-sp-menu .n-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    padding: 0 30px;
    border-bottom: 1px solid #dddddd;
    color: #333333;
    font-size: 17px;
    line-height: 1.4;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
  }

  .n-sp-menu .n-nav a::after {
    content: "→";
    color: #00B2D0;
    font-size: 25px;
    line-height: 1;
    font-weight: 300;
  }

  .n-sp-menu .n-header-search-btn {
    display: none !important;
  }

  .n-sp-menu .n-header-search-popup {
    display: block;
    position: static;
    width: 100%;
    margin-top: 14px;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  .n-sp-menu .n-header-search-popup form {
    display: grid;
    grid-template-columns: 1fr 72px;
    gap: 8px;
    padding: 0 10px;
    box-sizing: border-box;
  }

  .n-sp-menu .n-header-search-popup input[type="search"] {
    width: 100%;
    height: 46px;
    padding: 0 30px;
    border: none;
    background: #f0f0f0;
    font-size: 16px;
    box-sizing: border-box;
  }

  .n-sp-menu .n-header-search-popup button[type="submit"] {
    height: 46px;
    border: none;
    background: #1f5f96;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
  }

  body.is-menu-open {
    overflow: hidden;
  }
}

/* ===============================
   スマホ調整
   768px以下
================================= */
@media (max-width: 768px) {

  .n-ppe-item-grid {
    grid-template-columns: 1fr;
  }

  .n-high-ppe-lead {
    flex-direction: column;
  }

  .n-high-ppe-left,
  .n-high-ppe-text {
    flex: none;
    width: 100%;
  }
}

/* ===============================
   標準ページ：スマホ調整
   767px以下
================================= */
@media (max-width: 767px) {

  .entry-content .n-standard-nav {
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 30px 0 50px;
  }

  .entry-content .n-standard-nav__button {
    min-height: 52px;
    padding: 14px 18px;
    font-size: 15px;
  }

  .n-page-hero {
    width: calc(100% - 32px);
    min-height: 120px;
    height: auto;
    padding: 18px 20px;
  }

  .n-page-hero__inner {
    width: 100%;
    text-align: center;
  }

  .n-page-hero__title {
    display: -webkit-box;
    overflow: hidden;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 600;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

/* ===============================
   標準ページナビ 非表示（スマホ）
================================= */
@media (max-width: 767px) {
  .entry-content .n-standard-nav {
    display: none;
  }
}

/* ==================================
   PPE別に探す：タブレット
================================== */

@media (max-width: 1024px) {

  .entry-content .n-ppe-guide {
    width: 90%;
  }

  .entry-content .n-ppe-guide__image {
    flex-basis: 160px;
    width: 160px;
    height: 190px;
  }

}

/* ==================================
   PPE別に探す：スマホ
================================== */

@media (max-width: 767px) {

  .entry-content .n-ppe-guide {
    width: 100%;
    margin-top: 30px;
  }

  .entry-content .n-ppe-guide__description {
    margin-bottom: 24px;
    padding: 15px 18px;
  }

  .entry-content .n-ppe-guide__description-text {
    line-height: 1.8;
  }

  .entry-content .n-ppe-guide__box-title {
    padding: 9px 18px;
  }

  .entry-content .n-ppe-guide__box-body {
    padding: 0 18px 22px;
  }

  .entry-content .n-ppe-guide__item {
    display: block;
    padding-top: 22px;
  }

  .entry-content .n-ppe-guide__image {
    width: 100%;
    height: auto;
    min-height: 220px;
    margin-bottom: 20px;
  }

  .entry-content .n-ppe-guide__image img {
    height: auto;
    min-height: 220px;
  }

  .entry-content .n-ppe-guide__item-title {
    font-size: 16px;
  }

}
@media (max-width: 767px){

    .entry-content .n-fit-test{
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .entry-content .n-fit-test__image img{
        max-width: 100%;
    }

}

@media (max-width: 767px) {

    /* ページ内ナビをモバイルでは非表示 */
    .entry-content .n-navi-nav {
        display: none;
    }

}

/*======================================
 * 着脱方法：ページジャンプボタンのプルダウン
=======================================*/

@media (max-width: 767px) {

    /* PPE別の7ボタンだけ非表示 */
    .entry-content .n-anchor-buttons--ppe {
        display: none !important;
    }

    /* モバイル用プルダウン */
    .entry-content .n-anchor-dropdown {
        display: block;
        width: 100%;
        margin: 20px 0 40px;
    }

    .entry-content .n-anchor-dropdown summary {
        position: relative;
        padding: 14px 48px 14px 18px;
        background: #1F5F96;
        color: #fff;
        font-size: 14px;
        font-weight: bold;
        border-radius: 4px;
        cursor: pointer;
        list-style: none;
    }

    .entry-content .n-anchor-dropdown summary::-webkit-details-marker {
        display: none;
    }

    .entry-content .n-anchor-dropdown summary::after {
        content: "▼";
        position: absolute;
        right: 18px;
        top: 50%;
        transform: translateY(-50%);
    }

    .entry-content .n-anchor-dropdown[open] summary::after {
        content: "▲";
    }

    .entry-content .n-anchor-dropdown__menu {
        background: #fff;
        border: 1px solid #ddd;
        border-top: none;
    }

    .entry-content .n-anchor-dropdown__menu a {
        display: block;
        padding: 13px 18px;
        color: #333;
        font-size: 14px;
        text-decoration: none;
        border-bottom: 1px solid #eee;
    }

    .entry-content .n-anchor-dropdown__menu a:last-child {
        border-bottom: none;
    }
}