:root {
  --primary-color: #eef0f2;
  --shadow-color-light: rgb(255, 255, 255);
  --shadow-color-dark: rgba(0, 0, 0, 0.15);
  --accent-color: #6E80B9;
  --text-color: #88A5C3;
  --circle-gradient: linear-gradient(145deg, #ffbbbb, #c5eae8);
  --transition-duration: 0.1s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* ローディング画面のスタイル */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 1s ease;
}

.loading-screen.fade-out {
  opacity: 0;
}

.loading-logo {
  width: 200px;
  height: 200px;
  background: url('images/logo.blue.png') center center/contain no-repeat;
  animation: float 1.5s ease-in-out;
  opacity: 0;
  animation-fill-mode: forwards;
}

@keyframes float {
  0% {
    transform: translateY(20px);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

body {
  background-color: var(--primary-color);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 10px;
}

.page-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 0 10px;
}

.header-container {
  background-color: var(--primary-color);
  border-radius: 60px;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 
    3px 3px 6px var(--shadow-color-dark),
    -3px -3px 6px var(--shadow-color-light);
}

.content-container {
  background: url('images/BG1.jpg') center center/cover no-repeat;
  border-radius: 30px;
  padding: 40px 40px 0 40px;
  display: grid;
  grid-template-columns: 1fr 300px;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "main sidebar"
    "main sidebar"
    "footer footer";
  gap: 30px 0;
  box-shadow: 
    3px 3px 6px var(--shadow-color-dark),
    -3px -3px 6px var(--shadow-color-light);
  position: relative;
  height: auto;
  min-height: 80vh;
}

.home-page .content-container {
  display: grid;
  grid-template-columns: 1fr 300px;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "main sidebar"
    "main sidebar"
    "footer footer";
  gap: 30px 0;
}

/* About page specific layout */
.about-page .content-container {
  grid-template-columns: 1fr;
  grid-template-areas:
    "main"
    "footer";
}

/* Service page specific layout */
.service-page .content-container {
  grid-template-columns: 1fr;
  grid-template-areas:
    "main"
    "footer";
}

/* Company page specific layout */
.company-page .content-container {
  grid-template-columns: 1fr;
  grid-template-areas:
    "main"
    "footer";
}

.header-container .logo {
  color: var(--text-color);
  font-size: 22px !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px;
}

.header-container .logo a {
  text-decoration: none;
  color: inherit;
}

.menu-button {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background-color: var(--primary-color);
  box-shadow: 
    -3px -3px 6px var(--shadow-color-light),
    3px 3px 6px var(--shadow-color-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.menu-button:hover {
  box-shadow: 
    -2px -2px 4px var(--shadow-color-light),
    2px 2px 4px var(--shadow-color-dark);
}

.menu-button:active {
  box-shadow: 
    inset -2px -2px 4px var(--shadow-color-light),
    inset 2px 2px 4px var(--shadow-color-dark);
}

.menu-icon {
  width: 20px;
  height: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.menu-icon span {
  width: 100%;
  height: 2px;
  background-color: var(--text-color);
  border-radius: 2px;
}

.menu-nav {
  position: fixed;
  top: 0;
  right: 0;
  transform: translateY(100%);
  background-color: var(--primary-color);
  width: 33%;
  height: 100vh;
  padding: 100px 20px;
  box-shadow: -3px 0 6px var(--shadow-color-dark);
  visibility: hidden;
  opacity: 0;
  z-index: 1000;
  overflow-y: auto;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out, visibility 0.3s ease-out;
}

.menu-nav.active {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.menu-nav .menu-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: transparent;
}

.menu-nav .menu-logo {
  position: static;
  font-size: 32px;
  font-weight: bold;
  color: var(--text-color);
}

.menu-nav .close-button {
  position: static;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background-color: var(--primary-color);
  box-shadow: 
    -3px -3px 6px var(--shadow-color-light),
    3px 3px 6px var(--shadow-color-dark);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.menu-nav .close-button:hover {
  box-shadow: 
    -2px -2px 4px var(--shadow-color-light),
    2px 2px 4px var(--shadow-color-dark);
}

.menu-nav .close-button:active {
  box-shadow: 
    inset -2px -2px 4px var(--shadow-color-light),
    inset 2px 2px 4px var(--shadow-color-dark);
}

.menu-nav .close-button::before,
.menu-nav .close-button::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 2px;
  background-color: var(--text-color);
  border-radius: 2px;
}

.menu-nav .close-button::before {
  transform: rotate(45deg);
}

.menu-nav .close-button::after {
  transform: rotate(-45deg);
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
  z-index: 999;
}

.menu-overlay.active {
  visibility: visible;
  opacity: 1;
}

.menu-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.menu-nav li {
  background-color: var(--primary-color);
  border-radius: 15px;
  padding: 0;
  height: 100px;
  display: flex;
  align-items: stretch;
  cursor: pointer;
  box-shadow: 
    -3px -3px 6px var(--shadow-color-light),
    3px 3px 6px var(--shadow-color-dark);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.menu-nav li:hover {
  transform: none;
}

.menu-nav .number {
  font-size: 65px;
  font-weight: bold;
  color: var(--text-color);
  opacity: 1;
  width: 33.33%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
}

.menu-nav .text-container {
  width: 66.67%;
  margin: 0;
  background-color: var(--primary-color);
  border-radius: 10px;
  box-shadow: 
    -3px -3px 6px var(--shadow-color-light),
    3px 3px 6px var(--shadow-color-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  transition: all 0.3s ease;
}

.menu-nav li:hover .text-container {
  box-shadow: 
    inset 2px 2px 4px var(--shadow-color-dark),
    inset -2px -2px 4px var(--shadow-color-light);
}

.menu-nav li:hover .text {
  color: var(--text-color);
  transition: color 0.3s ease;
}

/* アクティブページのテキストコンテナスタイル */
.home-page .menu-nav li:nth-child(1) .text-container,
.about-page .menu-nav li:nth-child(2) .text-container,
.service-page .menu-nav li:nth-child(3) .text-container,
.company-page .menu-nav li:nth-child(4) .text-container,
.privacy-page .menu-nav li:nth-child(5) .text-container {
  box-shadow: 
    inset 2px 2px 4px var(--shadow-color-dark),
    inset -2px -2px 4px var(--shadow-color-light);
}

/* アクティブページのテキストスタイル */
.home-page .menu-nav li:nth-child(1) .text,
.about-page .menu-nav li:nth-child(2) .text,
.service-page .menu-nav li:nth-child(3) .text,
.company-page .menu-nav li:nth-child(4) .text,
.privacy-page .menu-nav li:nth-child(5) .text {
  color: var(--text-color);
}

.menu-nav .text {
  font-size: 32px;
  color: #ccc;
  letter-spacing: 1px;
  font-weight: 700;
  margin: 0;
  text-align: center;
}

.menu-nav li a {
  text-decoration: none;
  display: flex;
  align-items: stretch;
  width: 100%;
  color: inherit;
}

main {
  grid-area: main;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 30px;
  position: relative;
  height: 100%;
}

/* ナンバーボックスとタイトルを格納する透明なコンテナ */
.header-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 0;
  display: flex;
  align-items: center;
}

/* 各ページのヘッダー要素 */
.home-header,
.about-header,
.service-header,
.company-header,
.privacy-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0;
  position: relative;
  margin-bottom: 0px;
}

/* ナンバーボックスとタイトルの共通スタイル */
.number-box,
.about-number,
.service-number,
.company-number,
.privacy-number {
  width: 100px;
  height: 100px;
  background-color: var(--primary-color);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 48px;
  font-weight: 700;
  color: var(--text-color);
  box-shadow: 
    inset 2.5px 2.5px 5px var(--shadow-color-dark),
    inset -2.5px -2.5px 5px var(--shadow-color-light);
  position: relative;
}

.header-wrapper {
  margin-bottom: 0;
}
  
.number-box,
.about-number,
.service-number,
.company-number,
.privacy-number {
  width: 100px;
  height: 100px;
  font-size: 48px;
}

.input-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: auto;
}

.tags {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 20px;
}

.tag-container {
  display: flex;
  align-items: center;
  width: 600px;
  position: relative;
  height: 36px;
  overflow: hidden;
  cursor: pointer;
  border-radius: 20px;
}

.tag-text {
  padding: 8px 20px 8px 95px;
  color: var(--primary-color);
  font-size: 12px;
  height: 36px;
  width: 100%;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
}

.tag-container::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  height: 25px;
  width: 80px;
  background-color: var(--text-color);
  border-radius: 20px;
  z-index: 2;
  transition: width 0.5s ease-out;
}

.tag-background {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  height: 25px;
  width: 100%;
  background-color: var(--primary-color);
  border-radius: 20px;
  z-index: 1;
  box-shadow: 
    inset 3px 3px 5px var(--shadow-color-dark),
    inset -3px -3px 5px var(--shadow-color-light);
}

.tag {
  display: inline-block;
  padding: 8px 15px;
  color: white;
  font-size: 12px;
  font-weight: 500;
  width: 80px;
  text-align: center;
  position: relative;
  z-index: 4;
}

.tag-container:hover::before {
  width: 100%;
}

.tag-container:hover .tag-text {
  color: white;
  transition: color 0.3s ease;
}

.sidebar {
  grid-area: sidebar;
  background-color: var(--primary-color);
  border-radius: 20px;
  box-shadow: 
    inset 2px 2px 4px var(--shadow-color-dark),
    inset -2px -2px 4px var(--shadow-color-light);
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0;
  height: 100%;
  width: 300px;
}

.sidebar .sidebar-header {
  color: var(--text-color);
  font-size: 14px !important;
  font-weight: 500;
  text-align: center;
  margin: 10px;
}

.circle-image {
  width: 100%;
  height: 300px;
  border-radius: 15px;
  margin: 0 auto 15px auto;
  background: url('images/logo.blue3.png') center center/contain no-repeat;
  box-shadow: 
    2px 2px 4px var(--shadow-color-dark),
    -2px -2px 4px var(--shadow-color-light);
}

.list {
  display: flex;
  flex-direction: column;
  margin-top: auto;
}

.list-item {
  background-color: var(--primary-color);
  border-radius: 10px;
  padding: 5px 0px 5px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.list-item:hover {
  background-color: var(--accent-color);
}

.list-item:hover .title,
.list-item:hover .subtitle {
  color: var(--primary-color);
}

.list-item:hover .arrow {
  background-color: var(--accent-color);
  color: var(--primary-color);
  transform: none;
  box-shadow: 
    2px 2px 4px var(--shadow-color-dark),
    -2px -2px 4px rgb(123, 160, 255);
}

.list-item .title {
  color: var(--text-color);
  font-size: 14px !important;
  font-weight: 500;
  margin-bottom: 4px;
}

.list-item .subtitle {
  color: var(--text-color);
  font-size: 11px !important;
  opacity: 0.8;
}

.arrow {
  color: var(--text-color);
  margin-right: 10px;
  font-size: 25px;
  width: 30px;
  height: 30px;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    2px 2px 4px var(--shadow-color-dark),
    -2px -2px 4px var(--shadow-color-light);
  cursor: pointer;
  transition: all 0.3s ease;
}


.list-item a {
  text-decoration: none;
  color: inherit;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

footer {
  grid-area: footer;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 10px 0;
  height: 32px;
}

.footer-text {
  color: var(--text-color);
  font-size: 9px;
  opacity: 1;
  line-height: 1;
}

/* 共通のスタイル */
.page-image,
.page-text-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.page-text-box {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px;
  margin: 0;
}

.header-wrapper {
  margin-bottom: 0;
}
  
.number-box,
.about-number,
.service-number,
.company-number,
.privacy-number {
  width: 100px;
  height: 100px;
  font-size: 48px;
  margin-right: auto; /* 左詰めを維持 */
}
  
.home-title,
.about-title,
.service-title,
.company-title,
.privacy-title {
  font-size: 48px;
  margin-left: auto; /* 右詰めを維持 */
}

.about-page .about-header,
.service-page .service-header,
.company-page .company-header,
.privacy-page .privacy-header {
  flex-direction: row;
}

.about-image,
.service-image,
.company-image,
.privacy-image {
  height: 400px;
  max-height: 400px;
}

.home-header,
.about-header,
.service-header,
.company-header,
.privacy-header {
  justify-content: flex-end;
}

.home-page .home-header,
.about-page .about-header,
.service-page .service-header,
.company-page .company-header,
.privacy-page .privacy-header {
  flex-direction: row;
}

.home-title,
.about-title,
.service-title,
.company-title,
.privacy-title {
  font-size: 48px;
  color: var(--text-color);
  font-weight: bold;
  letter-spacing: 2px;
  margin-right: 20px;
}

/* About page styles */
.about-main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  gap: 30px;
  position: relative;
  height: 100%;
}

.about-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  align-items: start;
  background-color: var(--primary-color);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 
    inset 2px 2px 4px var(--shadow-color-dark),
    inset -2px -2px 4px var(--shadow-color-light);
  margin-bottom: 10px;
  height: auto;
  min-height: unset;
}

.about-image {
  width: 100%;
  height: 400px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 
    3px 3px 6px var(--shadow-color-dark),
    -3px -3px 6px var(--shadow-color-light);
}

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

.about-text-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  height: 400px;
}

.about-text-container .text-box:not(.title-box) {
  max-height: 400px;
  overflow: auto;
  position: relative;
}

.text-box {
  padding: 15px;
  background-color: var(--primary-color);
  border-radius: 20px;
  box-shadow: 
    2px 2px 4px var(--shadow-color-dark),
    -2px -2px 4px var(--shadow-color-light);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-color);
}

.text-box:not(.title-box) {
  overflow: auto;
  max-height: 300px;
  position: relative;
}

/* Service、Company、Aboutページのテキストボックス高さ調整 */
.service-text-container .text-box:not(.title-box),
.company-text-container .text-box:not(.title-box),
.about-text-container .text-box:not(.title-box) {
  max-height: 400px;
}

.text-box p {
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  height: auto;
}

.text-box.title-box {
  height: auto;
  padding: 10px 15px;
  background-color: var(--primary-color);
  border-radius: 20px;
  box-shadow: 
    2px 2px 4px var(--shadow-color-dark),
    -2px -2px 4px var(--shadow-color-light);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-color);
}

.text-box.title-box p {
  font-size: 25px;
  font-weight: 700;
  opacity: 1;
  line-height: 1.4;
}

/* スクロールバーのスタイル */
.text-box:not(.title-box)::-webkit-scrollbar {
  width: 8px;
}

.text-box:not(.title-box)::-webkit-scrollbar-track {
  background: var(--primary-color);
  border-radius: 4px;
}

.text-box:not(.title-box)::-webkit-scrollbar-thumb {
  background: var(--text-color);
  border-radius: 4px;
  opacity: 1;
}

/* スクロール可能を示すグラデーション */
.text-box:not(.title-box)::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(transparent, var(--primary-color));
  pointer-events: none;
  opacity: 0.7;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  transition: opacity 0.3s ease;
}

.text-box:not(.title-box).scrolled::after {
  opacity: 0;
}

/* Privacy page specific layout */
.privacy-page .content-container {
  grid-template-columns: 1fr;
  grid-template-areas:
    "main"
    "footer";
}

.service-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0;
}

.service-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  background-color: var(--primary-color);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 
    inset 2px 2px 4px var(--shadow-color-dark),
    inset -2px -2px 4px var(--shadow-color-light);
  margin-bottom: 10px;
  height: auto;
  min-height: unset;
}

.service-image {
  width: 100%;
  height: 400px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 
    3px 3px 6px var(--shadow-color-dark),
    -3px -3px 6px var(--shadow-color-light);
}

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

.service-text-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  height: 400px;
}

.service-text-container .text-box:not(.title-box) {
  max-height: 400px;
  overflow: auto;
  position: relative;
}

.company-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0;
}

.company-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  align-items: start;
  background-color: var(--primary-color);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 
    inset 2px 2px 4px var(--shadow-color-dark),
    inset -2px -2px 4px var(--shadow-color-light);
  margin-bottom: 10px;
  height: auto;
  min-height: unset;
}

.company-image {
  width: 100%;
  height: 400px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 
    3px 3px 6px var(--shadow-color-dark),
    -3px -3px 6px var(--shadow-color-light);
}

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

.company-text-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  height: 400px;
}

.company-text-container .text-box:not(.title-box) {
  max-height: 400px;
  overflow: auto;
  position: relative;
}

/* Privacy Page Styles */
.privacy-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0;
}

.privacy-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  align-items: start;
  background-color: var(--primary-color);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 
    inset 2px 2px 4px var(--shadow-color-dark),
    inset -2px -2px 4px var(--shadow-color-light);
  margin-bottom: 10px;
  height: auto;
  min-height: unset;
}

.privacy-image {
  width: 100%;
  height: 400px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 
    3px 3px 6px var(--shadow-color-dark),
    -3px -3px 6px var(--shadow-color-light);
}

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

.privacy-text-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  height: 400px;
}

.privacy-text-container .text-box:not(.title-box) {
  max-height: 400px;
  overflow: auto;
  position: relative;
}

/* ページトランジションのスタイル-秒数はrootで変更 */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-duration) ease, visibility var(--transition-duration) ease;
}

.page-transition.active {
  opacity: 1;
  visibility: visible;
}

/* モバイル専用要素のスタイル */
.mobile-only {
  display: none;
}

@media (max-width: 1019px) {
  .mobile-only {
    display: block;
  }

  main {
    display: contents;
  }

  .header-wrapper {
    margin-bottom: 0;
  }
  
  .number-box,
  .about-number,
  .service-number,
  .company-number,
  .privacy-number {
    width: 80px;
    height: 80px;
    font-size: 36px;
  }
  
  .menu-nav {
    width: 90%;
    height: 100vh;
  }
  
  .content-container,
  .home-page .content-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 15px;
    border-radius: 20px;
    position: relative;
  }

  .sidebar {
    order: 2;
    width: 100%;
    margin-bottom: 30px;
    height: auto;
    margin-left: 0;
    padding-top: 10px;
    border-radius: 10px;
  }

  .input-area {
    order: 3;
  }

  .tag-container {
    width: 100%;
    max-width: 400px;
  }

  .page-container {
    padding: 5px;
  }

  .header-container {
    padding: 15px 15px;
    position: sticky;
    top: 5px;
    z-index: 1000;
  }

  .content-container,
  .home-page .content-container {
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 15px;
    position: relative;
  }

  .about-text-container,
  .service-text-container,
  .company-text-container,
  .privacy-text-container {
    height: auto;
    min-height: unset;
  }

  .about-page .about-main,
  .service-page .service-main,
  .company-page .company-main,
  .privacy-page .privacy-main {
    grid-area: main;
    height: 100%;
    width: 100%;
    gap: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
  }

  .home-page .home-header,
  .about-page .about-header,
  .service-page .service-header,
  .company-page .company-header,
  .privacy-page .privacy-header {
    flex-direction: row;
    margin-top: 15px;
  }

  .home-title,
  .about-title,
  .service-title,
  .company-title,
  .privacy-title {
    font-size: 32px;
    font-weight: bold;
    color: var(--text-color);
    margin-right: 15px;
  }

  .about-content,
  .service-content,
  .company-content,
  .privacy-content {
    padding: 10px;
    margin: auto;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
    grid-template-columns: 1fr;
    border-radius: 15px;
    box-shadow: 
      inset 2px 2px 4px var(--shadow-color-dark),
      inset -2px -2px 4px var(--shadow-color-light);
  }

  .page-transition.active {
    opacity: 1;
    visibility: visible;
  } 

  .text-box:not(.title-box)::after {
    display: none;
  }
  .about-text-container .text-box:not(.title-box),
  .service-text-container .text-box:not(.title-box),
  .company-text-container .text-box:not(.title-box),
  .privacy-text-container .text-box:not(.title-box) {
    max-height: unset;
    overflow: visible;
    height: auto;
    margin-bottom: 0;
  }

  .about-page .about-text-container,
  .service-page .service-text-container,
  .company-page .company-text-container,
  .privacy-page .privacy-text-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    height: auto;
    min-height: unset;
  }

  .about-text-container .text-box.title-box,
  .service-text-container .text-box.title-box,
  .company-text-container .text-box.title-box,
  .privacy-text-container .text-box.title-box {
    padding: 10px 15px;
    border-radius: 10px;
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--text-color);
  }

  .text-box.title-box p {
    font-size: 20px;
    font-weight: 700;
    opacity: 1;
    line-height: 1.4;
  }
  
  .about-text-container .text-box p,
  .service-text-container .text-box p,
  .company-text-container .text-box p,
  .privacy-text-container .text-box p {
    height: auto;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin: 0;
    padding: 0;
  }

  .about-page .text-box p,
  .service-page .text-box p,
  .company-page .text-box p,
  .privacy-page .text-box p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal; /* テキストを折り返す */
    height: auto; /* 高さを自動調整 */
  }
  .about-page .text-box,
  .service-page .text-box,
  .company-page .text-box,
  .privacy-page .text-box {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px;
    margin: 0;
    overflow: visible; /* スクロールを無効化 */
    height: auto; /* 高さを自動調整 */
    border-radius: 10px;
  }

  .about-page .about-image,
  .company-page .company-image,
  .privacy-page .privacy-image {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 10px;
  }
  
  .service-image {
    width: 100%;
    max-width: 100%;
    margin: 0;
    aspect-ratio: 4/3;
    height: auto;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
  }
  
  .service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
  }

  footer {
    order: 4;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    height: 32px;
  }

  .footer-text {
    color: var(--text-color);
    font-size: 9px;
    opacity: 1;
    line-height: 1;
    text-align: center;
  }
  
}


