/* 会社概要ページ専用CSS */

.company-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ヘッダーセクション */
.company-header {
  background-color: #cfe8f3;
  padding: 40px 0;
  margin-bottom: 40px;
}

.header-content {
  text-align: left;
}

.company-title {
  font-size: 28px;
  color: #333;
  font-weight: bold;
  margin: 0;
  padding: 0 20px;
}

/* 事務所の写真セクション - 回り込みレイアウト */
.office-section {
  margin-bottom: 60px;
}

.office-content {
  position: relative;
  padding: 0 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.office-content::after {
  content: "";
  display: table;
  clear: both;
}

.office-left {
  max-width: 300px;
  margin-right: 0;
  margin-bottom: 20px;
}

.office-photo {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  float: left;
  margin-right: 30px;
  margin-bottom: 20px;
}

.office-description {
  font-size: 14px;
  line-height: 1.8;
  color: #333;
  margin: 0 0 15px 0;
  text-align: justify;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* 組織図セクション */
.organization-section {
  background-color: #f5f5f5;
  padding: 40px;
  text-align: center;
  margin-bottom: 60px;
  clear: both;
}

.button-group {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 15px 30px;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  min-width: 200px;
  text-align: center;
}

.btn-primary {
  background-color: #0066cc !important;
  color: white !important;
  border: 2px solid #0066cc;
}

.btn-primary:hover {
  background-color: #0052a3 !important;
  border-color: #0052a3;
  color: white !important;
  text-decoration: none;
}

.btn-primary:link,
.btn-primary:visited {
  color: white !important;
}

.btn-secondary {
  background-color: #f8f9fa;
  color: #0066cc;
  border: 2px solid #0066cc;
}

.btn-secondary:hover {
  background-color: #0066cc;
  color: white;
  text-decoration: none;
}

/* 代表者のメッセージセクション - 回り込みレイアウト */
.message-section {
  background-color: #fff;
  margin-bottom: 60px;
}

.message-header {
  background-color: #cfe8f3;
  padding: 20px;
  margin-bottom: 40px;
}

.message-title {
  font-size: 20px;
  color: #333;
  font-weight: bold;
  margin: 0;
  padding: 0 20px;
}

.message-content {
  position: relative;
  overflow: hidden;
}

.message-left {
  float: left;
  width: 200px;
  text-align: center;
  margin-right: 30px;
  margin-bottom: 20px;
}

.message-subtitle {
  font-size: 20px;
  color: #333;
  font-weight: bold;
  line-height: 1.4;
  margin: 0;
}

.message-right {
  overflow: hidden;
}

.message-text {
  font-size: 14px;
  line-height: 1.8;
  color: #333;
  margin: 0 0 15px 0;
  text-align: justify;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
  .company-container {
    padding: 0 15px;
  }

  .company-title {
    font-size: 22px;
  }

  /* タブレット以下では回り込みを解除 */
  .office-left,
  .message-left {
    float: none;
    width: 100%;
    margin-right: 0;
    margin-bottom: 20px;
  }

  .office-photo {
    width: 100%;
    max-width: 100%;
    margin: 0 0 20px 0;
    display: block;
    float: none;
  }

  .office-right,
  .message-right {
    overflow: visible;
    padding: 0 15px;
  }

  .office-title,
  .message-subtitle {
    font-size: 20px;
  }

  .organization-section {
    padding: 30px 20px;
  }

  .button-group {
    flex-direction: column;
    gap: 15px;
  }

  .btn {
    min-width: auto;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
}

@media screen and (max-width: 480px) {
  .company-header {
    padding: 30px 0;
    margin-bottom: 30px;
  }
  .office-content {
    position: relative;
    padding: 0 15px;
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: hidden;
  }
  .company-title {
    font-size: 18px;
    padding: 0 15px;
  }

  .office-section,
  .message-section {
    margin-bottom: 40px;
  }

  .office-left,
  .message-left {
    padding: 0 15px;
    margin-bottom: 20px;
  }

  .office-title,
  .message-subtitle {
    font-size: 18px;
  }

  .office-description,
  .message-text {
    font-size: 13px;
    padding: 0 0;
  }

  .message-header {
    padding: 15px;
  }

  .message-title {
    font-size: 18px;
    padding: 0 15px;
  }

  .btn {
    font-size: 14px;
    padding: 12px 20px;
  }
}

/* 会社ページ専用：SP表示時の横スクロール抑止 */
@media screen and (max-width: 768px) {
  /* アンカーを折返し可能にして横はみ出しを防止 */
  .anchorList01 {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  .anchorList01 li {
    float: none;
    white-space: normal;
    padding: 0;
    background: none;
  }

  /* このページ内の画像はビューポート内にクランプ */
  #noAsideContents img {
    max-width: 100%;
    height: auto;
  }

  /* 念のため横方向のはみ出しを遮断 */
  #noAsideContents {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* 会社ページ全体の横幅を安全側にクランプ */
  html,
  body {
    overflow-x: hidden;
  }
  #pageContainer,
  #contentsContainer {
    max-width: 100%;
    overflow-x: hidden;
    margin-left: 0;
    margin-right: 0;
  }
  .message-content {
    max-width: 100%;
    overflow-x: hidden;
  }
}
@media screen and (max-width: 768px) {
  #contentsContainer {
    max-width: 370px;
  }
}
