*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: "Yu Gothic", "游ゴシック体", "Hiragino Kaku Gothic ProN",
    "Meiryo", sans-serif;
}
.header {
  display: flex;
  background-color: #f8f8f8;
  top: 10px;
}
@media screen and (min-width: 769px) {
  .nav-menu {
    margin-top: -45px;
    margin-bottom: 10px;
  }

  .hamburger {
    display: none !important;
  }

  .close-btn {
    display: none !important;
  }
}

/* メイン画像を前面に */
.image-container,
.text-line,
.message-hako {
  position: relative;
  z-index: 1;
}

/* ロゴと会社名 */
/* ロゴ全体の配置 */
.logo-container {
  top: 0px;
  display: flex;
  align-items: flex-start; /* ← 中央ではなく上揃えに */
  gap: 1px; /* ロゴ画像と文字の間隔 */
}

/* ロゴ画像 */
.logo-image {
  width: 50px;
  height: auto;
  margin-left: 10px;
  margin-top: 25px;
}

/* 福祉用具レンタルサービス */
.logo-text p {
  margin: 0; /* ← 下だけ2px空ける（デフォルトの余白を消す） */
  font-size: 0.85rem;
  color: #333;
  margin-top: 30px; /* ← 上に少し余白を空けたい場合 */
}

/* 株式会社K2 */
.logo-text h1 {
  margin: 0; /* ← 余白ゼロにして行間を詰める */
  font-size: 1.2rem;
  color: #699fcd;
  margin-top: 1px;
}

.main-heading {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.05em;
}

/* ハンバーガーアイコン */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  position: absolute;
  top: 20px;
  right: 20px;
  cursor: pointer;
  z-index: 1001;
}
.hamburger span {
  height: 4px;
  background: #333;
  border-radius: 2px;
  transition: 0.3s ease;
}

/* メニューの基本形 */
.nav-menu {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.menu {
  list-style: none;
  display: flex;
  flex-direction: row;
  gap: 20px;
  margin: 0;
  padding-top: 20px;
}
.menu li {
  position: relative;
  padding: 0 10px;
}
.menu li:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  height: 60%;
  width: 1px;
  background-color: #4169e1;
}
.menu li a {
  text-decoration: none;
  font-weight: bold;
  color: #333;
  font-family: "Yu Gothic", "游ゴシック体", sans-serif;
}
.menu li a:hover::after,
.menu li a.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #4169e1;
}

/* リンクの基本スタイル */
.menu li a {
  color: #000;
  text-decoration: none;
  position: relative;
  padding: 4px 0;
  font-weight: bold;
  font-size: 1rem;
  font-family: "Yu Gothic", "游ゴシック体", sans-serif;
}

/* ホバー時に下線 */
.menu li a:hover::after,
.menu li a.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #4169e1;
}

/* 共通設定 */
.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  top: -10px;
}

.menu li {
  padding: 0 15px;
}

.menu li a {
  text-decoration: none;
  font-weight: bold;
  color: #333;
}

nav ul li a:hover {
  color: #4169e1;
  text-decoration: none;
}

/* ハンバーガーメニュー初期は非表示 */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  cursor: pointer;
}

.hamburger span {
  height: 4px;
  background-color: #333;
  border-radius: 2px;
}

/* ===== パソコン表示（横並び） ===== */
@media screen and (min-width: 769px) {
  .nav-menu {
    display: flex !important;
    justify-content: flex-end;
    align-items: center;
    position: relative; /* ← static を relative に */
    top: 10px;
    margin-right: 20px;
    padding-bottom: 20px;
  }

  .menu {
    flex-direction: row;
    gap: 10px;
  }

  .hamburger {
    display: none !important;
  }
}

/* ===== スマホ表示（ハンバーガー） ===== */
@media screen and (max-width: 768px) {
  .hamburger {
    display: flex;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1001;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 60px;
    right: 20px;
    width: 140px;
    background-color: #fff;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }

  .nav-menu.active {
    display: flex;
  }

  .menu {
    gap: 10px;
    padding: 5px 0;
  }

  .close-btn {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 20px;
    background: none;
    border: none;
    cursor: pointer;
  }
  .menu li:not(:last-child)::after {
    content: none !important; /* 縦線を消す */
  }
}

/* スマホだけ閉じるボタン表示 */
@media screen and (max-width: 768px) {
  .close-btn {
    display: block;
  }
}

.message-box {
  top: 20px;
  max-width: 800px;
  position: relative;
  display: flex;
  align-items: center;
  font-family: "Osaka-Mono", "Osaka", monospace;
  background-image: repeating-linear-gradient(
    45deg,
    #f0f0f0,
    #f0f0f0 1px,
    #ffffff 1px,
    #ffffff 3px
  );
  padding: 20px 40px;
  line-height: 1.8;
  font-size: 1rem;
  margin: 40px auto;
  overflow: visible;
}

.main-heading {
  border-bottom: 1px solid #b6b5b5; /* 細い線（色はお好みで） */
  padding-bottom: 2px; /* 線と文字の間に少し余白 */
  margin-bottom: 16px; /* 線の下に余白 */
}

.person-photo {
  position: absolute;
  right: -100px; /* どれくらい“はみ出すか”調整 */
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  margin-left: 100px;
}

.person-photo img {
  max-width: 300px;
  height: auto;
}

.news-title {
  background: linear-gradient(to right, #4169e1, #acf8fe);
  color: white;
  padding: 5px;
  padding-left: 30px;
  font-size: 20px;
  max-width: 90%;
  margin: 0 auto;
}

#news {
  font-size: 24px;
  margin: 0;
  padding: 8px 0;
  line-height: 1.2;
  font-weight: bold;
}

.news-list-box {
  border: 1px solid #ccc;
  padding: 10px 20px;
  background-color: white;
  margin: 0 auto;
  /* ← ここを追加！ */
  max-width: 90%;
  height: 200px; /* 必要に応じて調整可能 */
  overflow-y: auto; /* 縦スクロールを有効に */
}

.news-item {
  display: flex;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px dotted #ccc;
  font-size: 14px;
}

.news-item:last-child {
  border-bottom: none;
}

.news-text {
  flex: 1;
}
.news-date {
  width: 120px;
  color: #4169e1;
  font-weight: bold;
}

.news-section {
  padding-top: 40px;
  max-width: 800px;
  margin: 0 auto;

  /* スクロールのために追加 */
  height: 300px; /* 固定高さにする（max-heightではなく） */
  overflow-y: auto; /* 縦スクロール有効 */
}

.bana {
  text-align: center;
  margin-top: 40px; /* ← お好きな数値で調整（例：40px） */
}

/* サービスセクション */

.service-section {
  background: linear-gradient(135deg, #373b44, #4286f4);
  padding-top: 30px;
  padding: 10px 20px; /* 内側の余白を追加 */
  height: 120vh;
}
/* 上2段のサービスアイテムだけ横幅を広げる */
.services-row:nth-of-type(1) .service-item,
.services-row:nth-of-type(2) .service-item {
  width: 410px; /* ← 好きな幅に調整（例：360px） */
}

h2 {
  margin-top: 50px;
  margin-bottom: 0px; /* ← ここ追加 */
  text-align: center;
  font-size: 30px;
  color: #fff;
  font-family: "Castro Script PERSONAL USE ONLY";
  font-weight: Regular;
}

.jigyou {
  margin-top: 0px;
  margin-bottom: 30px;
  text-align: center;
  font-size: 40px;
  color: #fff;
  font-family: "Osaka-Mono", "Osaka", monospace;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}
.services-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 40px;
}
.services-sita {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 40px;
}

.service-item {
  background-color: #fff;
  padding: 10px;
  width: 260px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.image-wrapper {
  position: relative;
  height: 160px;
  margin-bottom: 20px;
}

.service-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-icon {
  position: absolute;
  top: 130px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  background-color: #fff;
  padding: 5px;
  border-radius: 50%;
}

.service-item h4 {
  font-size: 16px;
  margin: 10px 0;
  color: #333;
}

.btn {
  display: inline-block;
  margin-top: 5px;
  margin-bottom: 5px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #77e2f0, #40c4ff, #00bcd4);
  color: #fff;
  border: none;
  border-radius: 30px;
  text-decoration: none;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2); /* ← 影を追加 */
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  background: linear-gradient(135deg, #258ae8, #4286f4, #2051c3);
  color: #fff;
}

.service-section {
  background-image: url("image/service-bg.jpg"); /* ←背景にしたい画像のパス */
  background-size: cover; /* 全体を覆う */
  background-position: center; /* 中央に配置 */
  background-repeat: no-repeat; /* 繰り返さない */
  padding: 60px 20px; /* 適切な余白 */
  color: #fff; /* 背景が暗い場合に白文字にする */
}

/* お問い合わせセクション */

.contact-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 1400px;
  margin: 0 auto; /* ← これを追加！ */
  background-color: white;
  padding: 40px 40px; /* 上下左右の余白調整（任意） */
}

.contact-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 80px; /* マップと情報の間にスペースを入れる */
  max-width: 1000px;
  width: 100%;
}

.h5 {
  margin-top: 0px;
  margin-bottom: 30px;
  text-align: center;
  font-size: 40px;
  color: #000;
  font-family: "Osaka-Mono", "Osaka", monospace;
}

h6 {
  text-align: left;
  margin-top: 0px;
  margin-bottom: 10px;
  background-color: #4169e1;
  color: white;
  display: inline-block;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 50px;
  font-size: 1rem;
  font-family: "Osaka-Mono", "Osaka", monospace;
}
.contact-icon-line {
  margin-top: 10px;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 10px; /* 下の余白も少なめに */
}

.contact-icon-line img.icon-circle {
  text-align: left;
  width: 28px; /* 少し小さめに調整可 */
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 6px; /* ← テキストとの間を狭く */
}

.contact-icon-line p {
  text-align: left;
  margin: 0; /* デフォルトの余白をリセット */
  font-size: 16px; /* 必要に応じて調整 */
}

.contact-map {
  flex: 1;
  min-width: 300px;
  padding: 40px;
  padding-left: 60px; /* ← 左側余白を増やす */
  padding-right: 60px; /* ← 右側余白を増やす */
}

.contact-info {
  flex: 1;
  min-width: 300px;
  padding: 40px;
  padding-left: 60px;
}

.info-box h3 {
  margin-bottom: 10px;
  color: #a7d3f2;
}

.contact-btn {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #77e2f0, #40c4ff, #00bcd4);
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* ← 影を追加 */
  font-family: "Osaka-Mono", "Osaka", monospace;
}
.contact-btn:hover,
.contact-btn:focus {
  background: linear-gradient(135deg, #258ae8, #4286f4, #2051c3);
  color: #fff; /* 必要なら文字色も変更 */
}

.contact-info {
  text-align: left !important;
}

.contact-icon-line,
.contact-icon-line * {
  text-align: left !important;
  margin-left: 0 !important;
  justify-content: flex-start !important;
}

.section-banner {
  background: linear-gradient(to right, #4169e1, #acf8fe);
  color: white;
  text-align: center;
  font-size: 2rem; /* タイトルの大きさ */
  font-weight: bold;
  padding: 30px 0;
}

/* フッター */
footer {
  text-align: center;
  padding: 20px;
  background-color: #567b9d;
  color: #fff;
  font-size: 0.7rem;
}
.page-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: #f1f8f8;
  color: #333;
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  line-height: 50px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  transition: all 0.3s ease;
  z-index: 1000;
}

.page-top:hover {
  background-color: #4169e1;
  color: #fff;
  transform: translateY(-5px);
}
/* ======= レスポンシブ対応：スマホ画面向け ======= */
@media screen and (max-width: 768px) {
  .logo-image {
    width: 40px;
    height: auto;
    margin-top: 10px; /* 上に5px移動 */
  }

  .logo-text p {
    margin: 0;
    font-size: 0.5rem;
    color: #333;
    margin-top: 20px; /* 上に5px移動 */
  }

  .logo-text h1 {
    margin-top: 0px;
    font-size: 0.8rem;
    color: #6ca7d9;
  }
  nav {
    margin-top: 10px;
  }

  .menu {
    flex-direction: column;
    gap: 10px;
  }

  .news-section {
    margin-top: -10px;
    height: 250px;
    max-height: none;
    font-size: 0.5rem;
  }
  .news-title {
    font-size: 0.8rem; /* お好みで */
  }
  /* ニュースリスト内のテキスト */
  .news-item,
  .news-text,
  .news-date {
    font-size: 0.75rem; /* お好みで */
    margin: 0;
  }

  .news-list-box {
    height: auto;
    max-height: none;
  }

  .news-item {
    margin: 0;
    gap: 0.1rem; /* スマホでは余白を詰める */
  }
}

@media screen and (max-width: 768px) {
  .message-box {
    max-width: 80%;
    margin-top: -10px;
  }

  .main-heading {
    font-size: 15px;
  }

  .horizontal-text {
    font-size: 0.7rem;
    position: relative;
    z-index: 2; /* 一番上（文字） */
    max-width: 100%;
    text-align: left; /* 左寄せ */
    display: block;
    gap: 10px;
  }

  .person-photo {
    position: absolute; /* 必要なら */
    z-index: 1; /* 必要なら */
  }

  .person-photo img {
    width: 150px !important;
    height: auto !important;
    margin-top: 180px;
    margin-right: 60px;
  }
}

/* PCテキスト非表示・SPテキスト表示 */
.pc-text {
  display: none;
}
.sp-text {
  display: block;
}

/* 初期状態（パソコン用） */
.pc-text {
  display: block;
}

.sp-text {
  display: none;
}

/* スマホ用に切り替え（768px以下） */
@media screen and (max-width: 768px) {
  .pc-text {
    display: none;
  }

  .sp-text {
    display: block;
  }
}

@media screen and (max-width: 768px) {
  .services-row,
  .services-sita {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100% !important;
  }

  .service-item {
    width: 100px !important;
    font-size: 0.6rem;
    height: 140px !important;
    margin-top: 0;
  }

  .image-wrapper {
    height: 100px;
    margin-bottom: 20px;
  }

  .service-image {
    width: 80px !important;
    height: 55px;
  }

  .service-item h4 {
    font-size: 7px !important;
    margin-top: -50px;
  }

  .service-icon {
    width: 24px !important;
    height: 24px !important;
    margin-top: -85px;
  }

  .service-section {
    padding: 10px !important;
    height: auto !important;
    margin-top: -40px;
    padding-bottom: 20px !important;
  }
}
@media screen and (max-width: 768px) {
  .services-row {
    margin-bottom: 10px !important; /* ← 詰める */
  }

  .services-sita {
    margin-top: 0px !important; /* ← さらに詰める */
  }
}

@media screen and (max-width: 768px) {
  .btn {
    font-size: 0.4rem !important; /* ← 小さめの文字サイズ */
    padding: 6px 12px !important; /* ← 上下左右の余白を小さく */
    border-radius: 20px !important; /* ← 丸みも少し調整 */
    margin-top: 0px !important; /* ← 間隔も狭く */
    margin-bottom: 0px !important;
  }
}

@media screen and (max-width: 768px) {
  .jigyou {
    font-size: 20px !important;
    margin-top: 10px !important;
  }
}

@media screen and (max-width: 768px) {
  .contact-section h4 {
    font-size: 15px !important;
    margin-top: 10px !important;
  }

  .h5 {
    font-size: 20px !important;
  }
}
@media screen and (max-width: 768px) {
  .contact-map {
    width: 100%;
    padding: 0 10px; /* 左右に少し余白をつける */
    text-align: center; /* iframeを中央寄せに */
  }

  .contact-map iframe {
    width: 90% !important;
    height: 250px !important;
    max-width: 100%;
    border: 0;
  }
}
@media screen and (max-width: 768px) {
  .contact-info {
    font-size: 1rem; /* 全体の文字を少し小さく */
    padding: 10px 10px 10px 10px;
  }

  .info-box h6 {
    font-size: 1rem; /* 小見出し（所在地・連絡先）をさらに小さく */
    padding: 6px 12px; /* バッジ風の背景サイズも調整 */
    margin-top: 0;
    margin-bottom: 5px;
  }

  .contact-icon-line p {
    font-size: 1rem; /* 電話番号などのテキスト */
  }

  .contact-btn {
    font-size: 1.5em;
    padding: 8px 16px; /* ボタン自体も小さく */
  }
}
@media screen and (max-width: 768px) {
  .contact-wrapper {
    gap: 10px !important;
  }
  .contact-info,
  .contact-map {
    padding: 10px !important;
  }
  .info-box {
    margin: 0 !important;
    padding: 0 !important;
  }
  .info-box h6 {
    margin: 0 !important;
    padding: 6px 12px;
  }
}
@media screen and (max-width: 768px) {
  .contact-btn {
    display: block; /* ブロック表示にして幅指定を有効に */
    width: 80%; /* 横幅を80%に設定（必要に応じて調整） */
    max-width: 400px; /* 最大幅を設定して大きくなりすぎないように */
    margin: 20px auto 0 auto; /* 上に余白、左右を自動で中央寄せ */
    text-align: center; /* ボタン内のテキスト中央揃え */
    font-size: 1rem; /* 文字サイズ調整 */
    padding: 12px 0; /* 上下のパディング調整 */
  }
}

@media screen and (max-width: 768px) {
  footer {
    padding: 10px 0 !important; /* 上下の余白を減らす */
    font-size: 0.6rem !important; /* 文字サイズを小さく */
  }
  .section-banner {
    background: linear-gradient(to right, #4169e1, #acf8fe);
    color: white;
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    padding: 20px !important; /* 上下60px、左右20px */
    margin-top: 20px !important;
  }
}
