@charset "utf-8";

@import url("https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New:wght@300;400;500;700;900&family=Rubik:wght@500;600;700&display=swap");

html,
body {
  margin: 0;
  color: var(--color-base);
  font-family: "Zen Kaku Gothic New", sans-serif;
  line-height: 1.6;
  font-weight: 500;
  background-color: #ebf4ff;
}
img {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
}
p {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}

.rubik {
  font-family: "Rubik", sans-serif;
}

:root {
  --color-main: #2c5ea7;
  --color-base: #333;
  --color-accent: #229e70;
  --gradient-main: linear-gradient(
    90deg,
    var(--color-accent) 0%,
    var(--color-main) 100%
  );
}

/*------------
  common
------------*/

.fade,
.fade-delay {
  transform: translateY(50px);
  opacity: 0;
  transition:
    transform 0.5s,
    opacity 0.5s;
}
.fade._in,
.fade-delay._in {
  transform: translateY(0);
  opacity: 1;
}

/*
  page-top
------------*/

.page-top {
  position: fixed;
  z-index: 100;
  right: 30px;
  bottom: -200px;
  width: 50px;
  height: 50px;
  transition: bottom 0.8s;
  cursor: pointer;
}

/*------------
  header
------------*/

/* ヘッダー全体のスタイル */
.header {
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); /* 軽く影をつけると浮き出て綺麗です */
  position: sticky; /* 上部に固定する場合 */
  top: 0;
  z-index: 1000;
}

.header__inner {
  max-width: 1200px; /* サイトの最大幅に合わせて調整 */
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  align-items: center; /* 縦方向の中央揃え */
}
.header-descr {
  font-size: 10px;
  font-weight: 500;
  color: #666;
  margin-bottom: 3px; /* 少しだけロゴに近づけると一体感が出ます */
  letter-spacing: 0.05em;
  line-height: 1;
}

.header-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* ロゴ */
.header-logo img {
  max-width: 100%; /* 親要素からはみ出さないように */
  height: 34px;
  width: auto;
  display: block;
}

/* ナビゲーション */
.header-nav {
  margin-left: auto; /* ロゴとナビの間を広げる */
}

.header-nav__list {
  display: flex;
  list-style: none;
  gap: 30px; /* メニュー間の余白 */
  margin: 0;
  padding: 0;
}

.header-nav__list a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
  font-size: 15px;
  transition: color 0.3s;
}

.header-nav__list a:hover {
  color: #395fa4; /* ホバー時の色（サイトカラーに合わせて変更してください） */
}

/* お問い合わせボタン（画像を使わない） */
.header-contact {
  margin-left: 30px;
}

.header-contact__button {
  display: inline-flex; /* flexにしてアイコンと文字を並べる */
  align-items: center;
  background: var(--gradient-main) !important;
  color: #fff !important;
  text-decoration: none;
  padding: 12px 25px;
  border-radius: 5px;
  font-weight: bold;
  font-size: 14px;
  background-size: 200% auto;
  transition: all 0.3s;
}

/* 疑似要素でアイコンを作成 */
.header-contact__button::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: rotate(45deg); /* 矢印の形にする */
  margin-left: 10px; /* 文字との間隔 */
  transition: transform 0.3s;
}

.header-contact__button:hover::after {
  transform: translateX(3px) rotate(45deg); /* ホバーで矢印が少し右に動く */
}

/* --- PC/共通スタイル --- */
.pc-only {
  display: block;
}
.sp-only {
  display: none;
}

/* --- ハンバーガーボタンのスタイル --- */
.hamburger {
  display: none; /* PCでは隠す */
  width: 30px;
  height: 24px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1000 !important;
}

.hamburger span {
  display: block;
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: #333;
  transition: all 0.3s;
}

.hamburger span:nth-child(1) {
  top: 0;
}
.hamburger span:nth-child(2) {
  top: 11px;
}
.hamburger span:nth-child(3) {
  bottom: 0;
}

/*------------
 検索窓
------------*/

/* 検索窓の共通スタイル */
.header-search {
  position: relative;
}

.search-form {
  display: flex;
  align-items: center;
  background-color: #f5f5f5;
  border-radius: 20px;
  padding: 2px 5px 2px 15px;
  border: 1px solid #ddd;
}

.search-input {
  border: none;
  background: transparent;
  outline: none;
  height: 32px;
  width: 150px; /* PCでの幅 */
  font-size: 14px;
}

.search-submit {
  border: none;
  background: var(--color-main) !important;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

/* 虫眼鏡アイコンのスタイル（中身は以前と同じ） */
.search-icon {
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  position: relative;
  display: block;
}
.search-icon::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 6px;
  background: #fff;
  bottom: -4px;
  right: -3px;
  transform: rotate(-45deg);
}

/* --- レイアウト調整 --- */
main {
  max-width: 1100px; /* メインコンテンツの左右に余白を追加 */
  margin: 0 auto;
}

.container {
  padding-top: 60px;
}

/* PC版：ロゴとメニューの間に余白を作る */
.header-search.pc-only {
  margin-left: 30px;
}

/* --- リセットボタンの調整 --- */
.table-controls {
  margin: 10px 0 0;
  padding-bottom: 10px;
  text-align: right; /* 右寄せにすることで表の端と揃える */
}

.reset-button {
  background-color: #f8f8f8;
  border: 1px solid #ddd;
  color: #666;
  padding: 6px 12px;
  border-radius: 20px; /* 角を丸くすると「補助ボタン」感が出てスッキリします */
  font-size: 13px;
  cursor: pointer;
  transition: 0.2s;
}

/*------------
  footer
------------*/

.footer {
  background-color: #f9f9f9; /* 薄いグレーで上品に */
  color: #333;
  padding: 60px 0 30px;
  border-top: 1px solid #eee;
}

.footer-container {
  max-width: 1100px; /* MVの幅と合わせると綺麗です */
  margin: 0 auto;
  padding: 0 20px;
}

.footer-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-end; /* 下揃えにすることでスッキリします */
}

/* 会社情報 */
.footer-info__logo img {
  height: 30px; /* 少し小ぶりに */
  width: auto;
  margin-bottom: 20px;
}

.footer-info__address {
  font-style: normal;
  font-size: 14px;
  line-height: 1.8;
  color: #666;
}

.footer-info__tel {
  font-weight: bold;
  font-size: 16px;
  color: #666;
}

.footer-info__btn {
  margin-top: 20px;
}

.footer-info__btn a {
  font-size: 13px;
  color: #395fa4;
  text-decoration: none;
  font-weight: bold;
}

/* コピーライト */
.copyright {
  font-size: 12px;
  color: #999;
}

/* ボタン本体 */
.page-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 50px;
  height: 50px;
  background-color: #4a83db; /* サイトのアクセントカラー */
  border-radius: 50%; /* 丸いボタン */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  opacity: 0; /* 最初は隠しておく（JSで制御） */
  visibility: hidden;
}

/* ボタンが表示された時のクラス */
.page-top.is-active {
  opacity: 1;
  visibility: visible;
}

/* 上向き矢印（CSSで描画） */
.page-top__arrow {
  display: block;
  width: 12px;
  height: 12px;
  border-top: 3px solid #fff;
  border-left: 3px solid #fff;
  transform: rotate(45deg); /* 45度回して「上」に向ける */
  margin-top: 6px; /* 微調整 */
}

/* ホバー時の動き */
.page-top:hover {
  background-color: #4a83db;
  transform: translateY(-5px); /* ふわっと浮き上がる */
}

/* ==========================================
   レスポンシブ設定
   ========================================== */

/* --- PC (1024px以上) --- */
@media screen and (min-width: 1024px) {
  .page-top {
    position: fixed;
    width: 64px;
    height: 64px;
  }
}

/* --- PC (769px以上) --- */
@media screen and (min-width: 769px) {
  html,
  body {
    font-size: 16px;
  }
  :root {
    --width: 1104;
  }
  .sp {
    display: none !important;
  }
}

/* --- タブレット (1024px以下) --- */
@media screen and (max-width: 1024px) {
  html,
  body {
    font-size: 16px;
  }
  :root {
    --width: 750;
  }
  .pc {
    display: none !important;
  }

  main {
    max-width: 1100px;
    padding-inline: 20px;
    margin: 0 auto;
  }

  /* header */
  .header-nav {
    display: none; /* スマホではハンバーガーメニューにするのが一般的ですが、一旦非表示 */
    z-index: 999 !important;
  }
  .header__inner {
    justify-content: space-between;
  }
  .tablet-only {
    display: block;
  }
  .pc-only {
    display: none !important;
  }
  .sp-only {
    display: block !important;
  }

  .hamburger {
    position: fixed;
    top: 20px;
    right: 20px;
    display: block;
    z-index: 1000 !important;
  }

  .header-logo img {
    height: 32px;
  }

  .header-nav {
    display: block !important;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px); /* Safari用 */
    transition: all 0.3s ease;
    z-index: 999;
    padding-top: 80px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  }

  .header-nav.is-active {
    right: 0;
  }

  .header-nav__list {
    flex-direction: column;
    align-items: center;
    gap: 30px; /* 余白を少し調整 */
    margin: 0;
    padding: 0;
  }

  .header .header-contact__button {
    display: inline-block;
    background-color: #333;
    color: #fff !important;
    text-decoration: none;
    padding: 12px 35px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 15px;
    transition: all 0.3s ease;
    opacity: 1 !important;
    box-sizing: border-box;
  }

  .header-nav__list a {
    font-size: 18px;
    padding: 10px;
    display: block;
    width: 100%;
    text-align: center;
    color: #333;
    transition: all 0.3s;
  }

  .header-nav__list a:active,
  .header-nav__list a:hover {
    color: #37a2ab;
    background-color: rgba(55, 162, 171, 0.05);
  }

  .header .header-contact__button:hover,
  .header .header-contact__button:active,
  .header .header-contact__button:focus {
    background-color: #555 !important;
    opacity: 1 !important;
    transform: scale(1.05);
  }

  .hamburger.is-active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
  }
  .hamburger.is-active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.is-active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
  }

  /* search */
  .header-nav__list .header-search {
    width: 100%;
    max-width: 250px;
    margin: 0 auto 10px;
  }
  .header-nav__list .search-input {
    width: 100%;
  }

  /* page-top */
  @media (max-width: 1024px) {
    .page-top {
      width: 40px;
      height: 40px;
      right: 15px;
      bottom: 15px;
    }
    .page-top__arrow {
      width: 10px;
      height: 10px;
    }
  }
}

/* --- スマホ (768px以下) --- */
@media screen and (max-width: 768px) {
  main {
    padding-inline: 20px; /* メインコンテンツの左右に余白を追加 */
  }

  .container {
    padding-top: 40px;
  }
  .reset-button {
    padding: 4px 10px; /* 上下左右の余白を少し削る */
    font-size: 11px; /* 文字を一段階小さく */
    background-color: #fff; /* 背景を白にして軽く見せる */
  }

  .footer {
    padding: 40px 0 20px;
    text-align: center; /* スマホは中央寄せがスッキリします */
  }

  .footer-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }

  .footer-bottom {
    margin-top: 20px;
    border-top: 1px solid #eee;
    width: 100%;
    padding-top: 20px;
  }
}

.page-top.is-active {
  opacity: 1;
}

/* --- シミュレーションレイアウト --- */
.simulation-wrapper {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.simulation-filters {
  flex: 1;
}

.simulation-results {
  width: 100%;
}

@media screen and (min-width: 960px) {
  .simulation-wrapper {
    flex-direction: row;
    align-items: flex-start;
    gap: 30px;
  }
  .simulation-filters {
    flex: 1;
    min-width: 0;
  }
  .simulation-results {
    width: 420px;
    flex-shrink: 0;
    position: -webkit-sticky;
    position: sticky;
    top: 100px; /* ヘッダーの高さ + α */
  }
  .result-section .arrow-down {
    display: none;
  }
}
