/*
 * スマホファースト対応CSS
 * モバイル優先のレスポンシブデザイン
 */

/* ===================================
   1. ベーススタイル（モバイル）
   =================================== */

/* フォントサイズの可変設定 */
html {
  font-size: 62.5%; /* 基準を10pxに */
}

body {
  font-size: clamp(1.4rem, 3.5vw, 1.6rem); /* 14px〜16px */
  line-height: 1.8;
  -webkit-text-size-adjust: 100%; /* iOSでのフォントサイズ自動調整を防止 */
}

/* 見出しのレスポンシブ対応 */
h1 {
  font-size: clamp(2.4rem, 6vw, 5rem); /* 24px〜50px */
  line-height: 1.3;
  margin-block-start: 0.5em;
  margin-block-end: 0.5em;
}

h2 {
  font-size: clamp(2rem, 5vw, 3rem); /* 20px〜30px */
  line-height: 1.4;
  margin-block-start: 0.3em;
  margin-block-end: 0.3em;
}

h3 {
  font-size: clamp(1.8rem, 4.5vw, 2.4rem); /* 18px〜24px */
  line-height: 1.4;
  margin-block-start: 0.3em;
  margin-block-end: 0.3em;
}

p {
  font-size: clamp(1.4rem, 3.5vw, 1.6rem); /* 14px〜16px */
  line-height: 1.8;
}

/* ===================================
   2. タッチターゲット最適化
   =================================== */

/* リンクとボタンは最低44pxのタッチエリア */
a, button, input[type="button"], input[type="submit"] {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
}

/* ナビゲーションリンク */
nav a {
  padding: 15px 12px;
  font-size: clamp(1.4rem, 3.5vw, 1.6rem);
  min-height: 48px;
}

/* ===================================
   3. レイアウトの最適化
   =================================== */

/* コンテナ */
.l-inner {
  width: 92%;
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* 画像のレスポンシブ対応 */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Flexboxレイアウト - モバイルは縦並び */
.flexbox {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* アイテム幅 - モバイルは100% */
.item10, .item20, .item30, .item40, .item50,
.item60, .item70, .item80, .item90 {
  width: 100%;
  margin-bottom: 16px;
}

/* ===================================
   4. ナビゲーションの最適化
   =================================== */

/* ハンバーガーメニュー */
.hamburger2 {
  display: block;
  position: fixed;
  z-index: 9999;
  right: 16px;
  top: 16px;
  width: 48px;
  height: 48px;
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 4px;
  padding: 8px;
}

.hamburger2 span {
  display: block;
  position: absolute;
  width: 32px;
  height: 3px;
  left: 8px;
  background: #fff;
  transition: 0.3s ease-in-out;
  border-radius: 2px;
}

.hamburger2 span:nth-child(1) {
  top: 12px;
}

.hamburger2 span:nth-child(2) {
  top: 22px;
}

.hamburger2 span:nth-child(3) {
  top: 32px;
}

/* スマホメニュー */
nav.globalMenuSp2 {
  position: fixed;
  z-index: 9998;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  transform: translateY(-100%);
  transition: transform 0.4s ease-in-out;
  overflow-y: auto;
}

nav.globalMenuSp2.active {
  transform: translateY(0);
}

nav.globalMenuSp2 ul {
  padding: 80px 20px 40px;
  margin: 0;
}

nav.globalMenuSp2 ul li {
  list-style: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

nav.globalMenuSp2 ul li a {
  display: block;
  color: #fff;
  padding: 20px 16px;
  font-size: 1.8rem;
  font-weight: 500;
  text-decoration: none;
  min-height: 60px;
  transition: background-color 0.3s;
}

nav.globalMenuSp2 ul li a:hover,
nav.globalMenuSp2 ul li a:active {
  background-color: rgba(255, 255, 255, 0.1);
}

/* ===================================
   5. カードレイアウトの最適化
   =================================== */

.card {
  width: 100%;
  margin: 16px 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.card-content {
  padding: 20px;
}

.card-title {
  font-size: clamp(1.8rem, 4.5vw, 2rem);
  margin-bottom: 12px;
}

.card-text {
  font-size: clamp(1.4rem, 3.5vw, 1.5rem);
  line-height: 1.7;
}

/* ===================================
   6. フッターの最適化
   =================================== */

.site-footer {
  padding: 40px 0 20px;
}

.footer_mi,
.foot {
  font-size: clamp(1.4rem, 3.5vw, 1.6rem);
  padding: 12px 0;
  text-align: center;
}

.item30_f1,
.item30_f2 {
  width: 100%;
  margin-bottom: 24px;
  text-align: center;
}

/* ===================================
   7. ボタンの最適化
   =================================== */

.button15 a,
.button09 a {
  width: 100%;
  max-width: 300px;
  padding: 16px 24px;
  font-size: clamp(1.6rem, 4vw, 1.8rem);
  min-height: 56px;
}

/* ===================================
   8. テーブルの最適化
   =================================== */

#table01 {
  width: 100%;
  overflow-x: auto;
}

#table01 th,
#table01 td {
  display: block;
  width: 100%;
  padding: 16px 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

#table01 th {
  background-color: #f5f5f5;
  font-weight: bold;
}

/* ===================================
   9. トップページヒーローエリア
   =================================== */

#slider,
#slider2 {
  height: 60vh;
  min-height: 400px;
  max-height: 600px;
}

.top_panel {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.logo-area {
  width: 100%;
  max-width: 500px;
  background-color: rgba(189, 8, 28, 0.9);
  padding: 24px 20px;
  border-radius: 8px;
}

.logo-area p {
  color: #fff;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: bold;
  margin-bottom: 12px;
  line-height: 1.4;
  text-align: center;
}

.logo-area p.smallp {
  font-size: clamp(1.2rem, 3vw, 1.4rem);
  line-height: 1.6;
}

.logo_img,
.logo_img2 {
  max-width: 220px;
  margin: 0 auto 16px;
}

/* ===================================
   10. 余白の調整
   =================================== */

/* セクション間の余白 */
section,
article {
  margin-bottom: 40px;
}

/* 見出しの余白 */
.heading06 {
  margin-top: 40px;
  margin-bottom: 24px;
  padding: 20px 16px;
  font-size: clamp(2rem, 5vw, 2.6rem);
}

/* ===================================
   11. サービスボックスの最適化
   =================================== */

.service_box {
  flex-direction: column;
}

.service_aka,
.service_shiro {
  width: 100%;
  padding: 24px 16px;
}

.service_mi,
.service_mi2 {
  font-size: clamp(2rem, 5vw, 3rem);
  padding-bottom: 24px;
}

/* ===================================
   12. ニュース一覧の最適化
   =================================== */

.p-article04 {
  padding: 16px;
  margin-bottom: 12px;
}

.p-article04__title {
  font-size: clamp(1.4rem, 3.5vw, 1.6rem);
  line-height: 1.6;
  white-space: normal;
}

.date {
  font-size: 1.2rem;
  display: block;
  margin-bottom: 8px;
}

.term {
  font-size: 1.1rem;
  padding: 6px 12px;
  min-width: 80px;
  height: auto;
  line-height: 1.4;
}

/* ===================================
   13. ページトップボタン
   =================================== */

.pagetop {
  bottom: 20px;
  right: 20px;
}

.pagetop a {
  width: 50px;
  height: 50px;
  padding: 12px;
  font-size: 1.4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===================================
   14. タブレット対応（768px以上）
   =================================== */

@media screen and (min-width: 768px) {
  .l-inner {
    width: 90%;
    padding-left: 24px;
    padding-right: 24px;
  }

  .flexbox {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
  }

  .item50 {
    width: calc(50% - 10px);
  }

  .item30 {
    width: calc(33.333% - 14px);
  }

  .card {
    width: calc(50% - 10px);
  }

  .service_aka,
  .service_shiro {
    width: 50%;
    padding: 40px 24px;
  }

  .item30_f1,
  .item30_f2 {
    width: calc(33.333% - 16px);
    text-align: left;
  }

  #table01 th,
  #table01 td {
    display: table-cell;
    width: auto;
  }

  .logo-area {
    width: 60%;
    padding: 32px 40px;
  }

  .logo_img,
  .logo_img2 {
    max-width: 280px;
  }
}

/* ===================================
   15. デスクトップ対応（1024px以上）
   =================================== */

@media screen and (min-width: 901px) {
  body {
    font-size: 1.6rem;
  }

  .l-inner {
    width: 88.8%;
  }

  .hamburger2 {
    display: none !important;
  }

  section.sp {
    display: none !important;
  }

  nav.globalMenuSp2 {
    display: none !important;
  }

  .gnav-wrapper {
    display: flex !important;
  }

  nav.pc {
    display: block !important;
  }

  .item30 {
    width: calc(33.333% - 14px);
  }

  .item50 {
    width: calc(50% - 10px);
  }

  .card {
    width: calc(33.333% - 14px);
  }

  .logo-area {
    width: 50%;
    padding: 40px;
  }

  .logo_img,
  .logo_img2 {
    max-width: 350px;
  }

  #slider,
  #slider2 {
    height: 45vh;
  }
}

/* ===================================
   16. 大画面対応（1440px以上）
   =================================== */

@media screen and (min-width: 1440px) {
  h1 {
    font-size: 5rem;
  }

  h2 {
    font-size: 3rem;
  }

  h3 {
    font-size: 2.4rem;
  }

  .heading06 {
    font-size: 2.6rem;
  }
}
