/* Mobile baseline: default rules apply below 768px. */
/* 会社概要ページのメイン画像、会社情報表、沿革表。 */
/* ======================================
会社概要のメイン画像
======================================*/
.main-about__intro {
  position: relative;
  background: #000000;
  box-sizing: border-box;
  width: 100%;
}

.main-about__img {
  position: relative;
  background: #000000;
  text-align: center;
  box-sizing: border-box;
  overflow: hidden;
  width: 100%;
  height: 560px;
  margin: 0 auto;
  margin-bottom: 40px;
}

.main-about__img img {
  width: 100%;
  height: calc(100vh - 0px);
  max-height: 560px;
  object-fit: cover;
  object-position: 50% 100%;
}

/* ======================================
about_unit-table (既存)
======================================*/
.about_unit-table {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  padding: 0px 20px;
  line-height: 1.5;
}

.about_unit-table__title {
  position: relative;
  font-family: var(--font-family-display);
  font-weight: 600;
  font-style: normal;
  font-size: 28px;
  letter-spacing: 0.14rem;
  text-align: left;
  box-sizing: border-box;
  margin-top: 40px;
}

/* ======================================
table（レスポンシブ + 縦並び対応）
======================================*/
.about_unit-table__table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: clamp(14px, 2.2vw, 18px);
  text-align: left;

  th, td {
    border: 1px solid #aaa;
    padding: 10px;
  }
}

/* 住所の子テーブル */
.table-profile_address {
  /* 親テーブルをはみ出ないようにする */
  width: 100%;
  table-layout: fixed;
  word-wrap: break-word;
  font-size: clamp(14px, 2vw, 18px);

  th {
      min-width: 80px !important;
      width: 1%;
      white-space: normal !important;
  }

  td {
    width: auto;
    max-width: none;
    white-space: normal;
  }

  /* 地図表示の行 */
  a.show_map {
    display: block;
    text-align: right;
    color: blue;
    font-weight: 500;
  }
}

.br_pc{
  display: block;
}

/* ======================================
768px〜（タブレット）
======================================*/

/* ======================================
960px〜（PC）
======================================*/

/* Smartphone-only overrides (up to 767px). */
@media screen and (max-width: 767px) {

/* スマホでは縦並びに切り替え */

  .about_unit-table__table {
    table-layout: fixed;
    width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
    
    tr {
      display: block;
      margin-bottom: 12px;
    }

    th {
      display: block;
      white-space: normal;
      background-color: #eee;
      font-weight: bold;

    }

    td {
      display: block;
      white-space: normal;
      border-top: none;
    }
  }

  /* 住所テーブル */
  .table-profile_address {
    table-layout: fixed;
    overflow-wrap: break-word;
    margin-top: 5px;

    th {
      width: 100%;
      box-sizing: border-box;
    }
  }

  .br_pc{
    display: none;
  }

  /* 沿革テーブル */
  .table-history {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;

    tr {
        display: table-row;
    }

    th, td {
      display: table-cell;
      white-space: nowrap;
      font-size: clamp(8px, 2vw, 10px);
      border: 1px solid #aaa;
    }
    
    th {
      width: 60px;
    }

    td {
      width: calc(100% - 60px);
      word-break: break-all;
    }
  }
}

/* Tablet and larger overrides (768px and wider). */
@media screen and (min-width: 768px) {


  .main-about__intro {
    height: 600px;
  }

  .main-about__img {
    width: 500px;
    height: 600px;
    margin: 0 auto;
    margin-bottom: 160px;
  }

  .main-about__img img {
    width: auto;
    height: 100%;
    max-height: 600px;
  }

  .about_unit-table {
    max-width: 1120px;
    padding: 0px 80px;
    margin: 0 auto;
  }
  .about_unit-table:last-of-type {
    padding-bottom: 160px;
  }

  .about_unit-table__title {
    font-size: 38px;
    letter-spacing: 0.1rem;
    margin-top: 40px;
  }

  .about_unit-table__table {
    font-size: 18px;

    th, td {
      padding: 14px;
    }

    th {
      width: auto;
      min-width: 180px;
      white-space: nowrap;
      background-color: #eee;
      text-align: center;
    }
  }

  /* 沿革テーブル */
  .table-history th {
    width: auto;
    min-width: 80px;
    text-align: left;
  }
}

/* PC refinements (960px and wider). */
@media screen and (min-width: 960px) {


  .main-about__img {
    width: 500px;
    height: 600px;
  }


  .about_unit-table__title {
    font-size: 42px;
    letter-spacing: 0.12rem;
    margin-top: 100px;
  }


  .about_unit-table__table {
    font-size: 20px;
    
    th, td {
      padding: 16px 20px;
    }

    th {
      width: auto;
      min-width: 180px;
      white-space: nowrap;
      font-size: 20px;
    }

    td {
      font-size: 20px;
      max-width: 75%;
    }
  }
  
  /* 沿革テーブル */
  .table-history th {
    width: auto;
    min-width: 80px;
    text-align: left;
  }
}

