/* ===== Robot-Revolution: Fullscreen Modal ===== */

/* === Cookie Consent (Floating) ======================================== */
#cookieConsent.cookie-consent{
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 10000001; /* ヘッダーの z-index(9999999) より前面 */
  width: 360px;
  background: #000; /* サイト基調色 */
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  overflow: hidden;
}

.cookie-consent[hidden] { display: none !important; }

.cookie-consent__inner{
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cookie-consent__title{
  margin: 0 0 4px 0;
  font-size: 18px;
  color: #eee; /* 見出しは既存トーンに合わせ薄いグレー */
}

.cookie-consent__text p{
  margin: 0;
  color: rgba(255,255,255,0.9);
  font-size: 15px;
  line-height: 1.6;
}

.cookie-consent__link{
  /* 既存 a { color: red } / hover { #00ADB5 } に準拠（上書き不要） */
  text-decoration: underline;
}

.cookie-consent__buttons{
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* モバイルはフル幅のボトムバーに */
@media (max-width: 768px){
  #cookieConsent.cookie-consent{
    right: 0;
    left: 0;
    bottom: 0;
    width: auto;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }
  .cookie-consent__inner{
    padding: 12px 12px 16px;
  }
  .cookie-consent__buttons{
    justify-content: stretch;
  }
  .cookie-consent__buttons .btn{
    flex: 1 1 auto;
  }
}

/* 低モーション環境に配慮 */
@media (prefers-reduced-motion: reduce){
  #cookieConsent.cookie-consent{ transition: none !important; }
}

/* Cookieバナー表示中は Back-To-Top を自動で上にずらす（JSが高さを入れる） */
body.cookie-banner-visible .back-to-top{
  bottom: calc(16px + var(--cookie-banner-height, 84px));
}

/* === Back to Top (常時右下表示) =============================== */
.back-to-top{
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1040;          /* スライダーやナビより前面に */
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  color: #fff;
  background-color: #0d6efd;        /* Bootstrapの .btn-primary と近い色 */
  text-decoration: none;
  box-shadow: 0 6px 12px rgba(0,0,0,.15);
  transition: transform .12s ease, box-shadow .12s ease, opacity .2s ease;
}
.back-to-top:hover,
.back-to-top:focus{
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(0,0,0,.20);
}
.back-to-top:active{
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(0,0,0,.18);
}

/* モバイルで少し小さく */
@media (max-width: 575.98px){
  .back-to-top{
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
  }
}

/* 低モーション設定のユーザーに配慮 */
@media (prefers-reduced-motion: reduce){
  .back-to-top{
    transition: none;
  }
}


/*fh5co-parallax ios-fix*/
.fh5co-table,
.fh5co-table-cell,
.fh5co-parallax {
  height: 25%;
}
.fh5co-parallax {
  background-color: #555;
  /*background-attachment: fixed;*/
  background-attachment: scroll !important; /* fixed を避ける */
  background-size: cover;
  background-position: center center; /* !importantで中央だがスクロールしなくなるので削除 */
  position: relative;
}

.background_video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;

  min-width: 100vw;
  min-height: 100vh;
  max-width: none;
  max-height: none;

  object-fit: cover;
}

/* スマートフォン対応 */
@media screen and (max-width: 768px) {
  .background_video {
    width: 120vw; /* 左右が見切れるように */
    height: 100vh;
    object-fit: cover;
  }
}

.rr-modal {
  position: fixed;
  inset: 0;
  z-index: 99999; /* ヘッダー(9999999)より下でも覆えるよう overlay を別に用意 */
  display: none;  /* 初期は非表示 */
}

.rr-modal.is-open { display: block; }

.rr-modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(1px);
}

.rr-modal__dialog {
  position: fixed;
  inset: 0;                 /* 全画面 */
  display: flex;
  flex-direction: column;   /* header / body / footer の縦並び */
  background: #000;         /* 既存テーマに合わせる */
  color: #fff;
  border: 2px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
}

.rr-modal.is-open .rr-modal__dialog {
  opacity: 1;
  transform: translateY(0);
}

.rr-modal__header,
.rr-modal__footer {
  padding: 14px 18px;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.rr-modal__footer {
  border-top: 1px solid rgba(255,255,255,0.12);
  border-bottom: none;
}

.rr-modal__title {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.5px;
  color: #eee;
}

.rr-modal__body {
  padding: 22px 18px;
  overflow-y: auto;           /* 本文スクロール */
  flex: 1 1 auto;             /* 余白は本文に割り当てる */
}

/* 右上の × ボタン（既存の .btn/.btn-outline 風に） */
.rr-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 22px;
  line-height: 1;
  border: 2px solid rgba(255,255,255,0.2);
  background: transparent;
  color: #eee;
  padding: 2px 10px;
  border-radius: 4px;
}
.rr-modal__close:hover { color: #fff !important; }

/* スマホ最適化 */
@media screen and (max-width: 768px) {
  .rr-modal__body { padding: 16px 14px; }
  .rr-modal__title { font-size: 18px; }
}

/* フォーカスリング（アクセシビリティ） */
.rr-modal [tabindex], .rr-modal button, .rr-modal a {
  outline-color: red; /* 既存のアクセントカラー */
}