@charset "UTF-8";

#company {
  overflow-x: hidden;


  main {}

  .wrapper {
    display: flex;
    margin: 0 auto;
    width: 100%;
    max-width: 1200px;
    gap: 5%;
  }



  /* 左メニュー　ここから */

  aside {
    width: 20%;
    padding-top: 100px;
  }

  aside nav {
    position: sticky;
    top: 200px;
    z-index: 20;
  }

  aside nav ul {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
  }

  aside nav ul li {
    width: max-content;
  }

  aside a {
    display: flex;
    align-items: center;
    font-weight: 600;
    border-bottom: solid 1px rgba(0, 0, 0, 0);
  }

  aside a::before {
    content: "";
    background: url(../img/img_company/nomal.webp);
    display: inline-block;
    vertical-align: middle;
    width: 19px;
    height: 19px;
    margin-right: 0.5em;
    transition: 0.1s
  }

  aside a:hover::before {
    background: url(../img/img_company/hover.webp);
  }

  aside a:hover {
    opacity: 1;
    color: #009375;
    border-bottom: solid 1px #009375;
  }

  /* 左メニュー　ここから */


  /* メイン　ここから */
  article {
    width: 75%;
  }

  article h3 {
    font-size: 3rem;
    font-weight: bold;
    color: #3e3e3e;
    border-bottom: solid 1px #adadad;
    margin-bottom: 30px;
    padding-bottom: 20px;
  }

  article figure {
    margin: 1em 0
  }

  #ceo_message p {
    text-align: justify;
    line-height: 2;
  }

  #ceo_message p+p {
    margin-top: 2em;
  }

  article figure:nth-of-type(2) {
    margin: 2em 0 0;
    /* float: right; */
    text-align: right;
    width: max-content;
    margin-left: auto;
  }

  article figure:nth-of-type(2) figcaption {
    margin-bottom: 10px;
  }

  /* メイン　ここまで */

  section {
    padding: 100px 0 120px;
  }

  #ceo_message {
    position: relative;
    /* padding: 100px 0 120px; */

    .gray {
      background: #f4f4f4;
      position: absolute;
      top: 0;
      left: 0;
      height: 100%;
      z-index: -1;
      width: 100vw;
      margin-left: calc(100% / 3 - 50vw);
      overflow: hidden;
    }

  }


  #company_profile {

    dl {
      display: flex;
      gap: 0 5%;
      flex-wrap: wrap;
      padding: 1.3em 0;
      border-bottom: solid 1px #adadad;
    }

    dt {
      width: 25%;
    }

    dt h4 {
      font-weight: 600;
    }

    dd {
      width: 70%;
    }

    h4 {
      line-height: 2;
    }

    p {
      line-height: 2;
      text-align: justify;
    }

    p+p {
      margin-top: 2em;
    }

  }

  #company_address {
    position: relative;

    .gray {
      background: #f4f4f4;
      position: absolute;
      top: 0;
      left: 0;
      height: 100%;
      z-index: -1;
      width: 100vw;
      margin-left: calc(100% / 3 - 50vw);
      overflow: hidden;
    }

    dl {
      display: flex;
      gap: 0 5%;
      flex-wrap: wrap;
      padding: 1.3em 0;
      border-bottom: solid 1px #adadad;
    }

    dt {
      width: 25%;
    }

    dt h4 {
      font-weight: 600;
    }

    dd {
      width: 70%;
    }

    h4 {
      line-height: 2;
    }

    p {
      line-height: 2;
      text-align: justify;
    }

    p+p {
      margin-top: 2em;
    }

    iframe {
      width: 100%;
      margin-top: 2em;
      max-height: 290px;
      transform: translateZ(0);
    }

  }

  #character {

    figure {}

    figcaption {
      margin-top: 1em;
    }

    p {
      line-height: 2;
      text-align: justify;
    }

  }

  #history {
    position: relative;
    margin-bottom: 0 !important;
    /* padding: 100px 0 120px; */

    .gray {
      background: #f4f4f4;
      position: absolute;
      top: 0;
      left: 0;
      height: 100%;
      z-index: -1;
      width: 100vw;
      margin-left: calc(100% / 3 - 50vw);
      overflow: hidden;
    }

    dl {
      display: flex;
      gap: 0 5%;
      flex-wrap: wrap;
      padding: 1.3em 0;
      border-bottom: solid 1px #adadad;
    }

    dt {
      width: 25%;
    }

    dt h4 {
      font-weight: 600;
    }

    dd {
      width: 70%;
    }

    h4 {
      line-height: 2;
    }

    p {
      line-height: 2;
      text-align: justify;
    }

    p+p {
      margin-top: 2em;
    }
  }

  .nav_btn {
    display: none;
  }

  .anchor_popup {
    display: none;
  }


  #ceo_message,
  #company_profile,
  #company_address,
  #character,
  #history {
    scroll-margin-top: 91px;
  }

  @media screen and (max-width: 768px) {

    #ceo_message,
    #company_profile,
    #company_address,
    #character,
    #history {
      scroll-margin-top: 60px;
    }
  }


  @media screen and (max-width: 768px) {

    aside {
      display: none;
    }

    article {
      width: 90%;
      margin: auto;
    }

    #ceo_message .gray {
      margin-left: -5.5%;
    }

    #ceo_message {
      padding: 50px 0;
    }

    #company_profile {
      padding: 50px 0;
    }

    #company_profile dl {
      flex-direction: column;
    }

    #company_profile dl dt {
      width: 100%;
    }

    #company_profile dl dd {
      width: 100%;
    }

    #company_profile dl dd img+p {
      margin-top: 10px;
    }

    #company_profile p {
      line-height: 1.7;
    }

    #company_profile dt h4 br {
      display: none;
    }

    #company_address {
      padding: 50px 0;
    }

    #company_address .gray {
      margin-left: -5.5%;
    }

    #company_address dl {
      flex-direction: column;
    }

    #company_address dl dt {
      width: 100%;
    }

    #company_address dl dd {
      width: 100%;
    }

    #company_address p {
      line-height: 1.7;
    }

    #company_address dt h4 {
      line-height: 1.7;
    }

    #company_address dt h4 br:nth-of-type(2),
    #company_address dt h4 br:nth-of-type(3) {
      display: none;
    }

    #character {
      padding: 50px 0;
    }

    #character figcaption {
      font-size: 1.8rem;
      line-height: 1.7;
    }

    #character p {
      font-size: 1.8rem;
      line-height: 1.7;
    }

    article h3 {
      font-size: 2.6rem;
      margin-bottom: 25px;
      padding-bottom: 15px;
    }

    #history .gray {
      margin-left: -5.5%;
    }

    #history dl {
      flex-direction: column;
    }

    #history dl dt {
      width: 100%;
    }

    #history dl dt h4 {
      line-height: 1.7;
    }

    #history dl dd {
      width: 100%;
    }

    #history dl dd p {
      line-height: 1.7;
    }



    .nav_btn_wrapper {
      position: fixed;
      bottom: 5%;
      right: 0;
      z-index: 2200;

      /* * ラッパー自体を独立レイヤー化し、上下中央に配置
   * これが iframe に勝つための「おまじない」です 
   */
      transform: translateY(-50%) translateZ(0);
    }


    /* ▼▼▼ [修正] .nav_btn から position などを削除 ▼▼▼ */
    .nav_btn {
      /* position: fixed; ← 削除 */
      /* top: 50%; ← 削除 */
      /* right: 0; ← 削除 */
      /* z-index: 2200; ← 親に移動 */
      /* transform: ...; ← 親に移動 */

      /* ↓ 見た目のスタイルはそのまま残す */
      background: #009375;
      display: block;
      padding: 12px;
      width: 84px;
      clip-path: polygon(15px 0, 100% 0, 100% 100%, 15px 100%, 0 80%, 0 20%);
      transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .nav_btn .cross {
      position: relative
    }

    .nav_btn span:nth-of-type(1) {
      display: block;
      width: 6px;
      height: 34px;
      background: #fff;
      position: relative;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -0%);
    }

    .nav_btn span:nth-of-type(2) {
      display: block;
      width: 34px;
      height: 6px;
      background: #fff;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
    }

    .nav_btn p {
      color: #fff;
      font-weight: 800;
      line-height: 1;
      margin-top: 5px;
      font-size: 1.4rem;
      text-align: center;
    }

    /* ===================================
   アンカーリンク ポップアップ (修正版)
=================================== */

    /* ===================================
   アンカーリンク ポップアップ (全面・白)
=================================== */

    /* ポップアップ本体（全面白） */
    .anchor_popup {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: #fff;
      z-index: 2100;
      overflow-y: auto;

      display: flex;
      /* ← これを追加！ */

      opacity: 0;
      visibility: hidden;
      transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    /* JSで .is-active が付いたら表示 */
    .anchor_popup.is-active {
      opacity: 1;
      visibility: visible;
      display: flex;
    }

    /* ポップアップの中身 (余白・レイアウト用) */
    .anchor_popup_inner {
      /* 白い箱のスタイルを削除し、レイアウト用に変更 */
      width: 86%;
      /* max-width: 400px; */
      /* PCでの最大幅 */
      margin: 0 auto;
      /* 中央揃え */
      padding: 80px 0 40px 0;
      /* 上(×ボタン分)・下 */
      position: relative;
      box-sizing: border-box;
      align-items: center;
      display: flex;
    }

    /* 閉じるボタン (×) */
    .popup_close_btn {
      position: fixed;
      /* 画面右上に固定 */
      top: 10px;
      right: 10px;
      font-size: 30px;
      /* 少し大きく */
      line-height: 1;
      color: #888;
      background: none;
      border: none;
      cursor: pointer;
      padding: 10px;
      z-index: 2101;
      /* ポップアップ本体より手前 */
    }

    .popup_close_btn:hover {
      color: #000;
    }

    /* 目次リスト */
    .anchor_popup ul {
      list-style: none;
      padding: 0;
      text-align: left;
      width: 100%;
    }

    .anchor_popup li {
      margin: 0;
      border-bottom: 1px solid #a4a4a4;
    }

    .anchor_popup li:last-child {
      /* border-bottom: none; */
    }

    .anchor_popup a {
      text-decoration: none;
      color: #333;
      font-size: 2.0rem;
      font-weight: 600;
      transition: color 0.3s;
      display: block;
      padding: 20px 0px;
    }

    .anchor_popup a:hover {
      color: #009375;
      background: #f9f9f9;
    }

    /* ===================================
   nav_btn の表示／非表示
=================================== */

    /* ポップアップ表示中に .nav_btn を隠す */
    /* ▼▼▼ 「.nav_btn」を「.nav_btn_wrapper」に修正 ▼▼▼ */
    .anchor_popup.is-active+.nav_btn_wrapper {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }
  }

  /* ← media query の閉じカッコ */

}

/* ← #company の閉じカッコ */