/* base.css */
/* 基本のスタイル設定 */

html {
  font-size: var(--font-size-base);
  height: 100%;
}

body {
  font-family: var(--font-family-base);
  color: var(--color-text);
  background-color: var(--color-background);
  line-height: 1.6;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: hidden; /* 横スクロールを防止 */
  position: relative; /* パララックス背景のための相対位置指定 */
}

/* ④背景画像の修正 - グレーボックスの排除 */
/* パララックス背景用のレイヤー */
.parallax-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 500%; /* 背景を大きく拡大して十分なカバレッジを確保 */
  background-image: url('../img/bg-pattern.png');
  background-repeat: repeat;
  background-size: 100% auto; /* 横幅100%、高さは自動調整 */
  z-index: -1; /* コンテンツの後ろに配置 */
  pointer-events: none; /* マウスイベントを無視 */
  will-change: transform; /* パフォーマンス最適化 */
  transform-origin: center top; /* 変形の基準点を上部に設定 */
}

/* メインコンテンツ */
.page-content {
  position: relative;
  z-index: 1; /* 背景よりも前面に配置 */
  background-color: transparent;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: var(--color-primary);
  transition: color var(--transition-fast);
}

a:hover {
  color: darken(var(--color-primary), 10%);
}

img {
  max-width: 100%;
  height: auto;
}

/* プレースホルダー（動画やカルーセル用） */
.video-placeholder {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: var(--spacing-large);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  border-radius: var(--border-radius);
}

/* アスペクト比を維持するためのユーティリティクラス */
.aspect-ratio-16-9 {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9のアスペクト比 */
  overflow: hidden;
}

.aspect-ratio-16-9 > * {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 3:4のアスペクト比を維持するためのユーティリティクラス */
.aspect-ratio-3-4 {
  position: relative;
  width: 100%;
  padding-top: 133.33%; /* 3:4のアスペクト比 */
  overflow: hidden;
}

.aspect-ratio-3-4 > * {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* テキストオーバーレイのための基本スタイル */
.text-overlay {
  position: absolute;
  z-index: 10;
  pointer-events: none; /* 下の要素へのクリックを可能にする */
}

/* PC版のテキストアニメーション効果 */
@media (min-width: 768px) {
  .fade-in {
    animation: fadeIn 1.2s ease forwards;
    opacity: 0;
  }
  
  @keyframes fadeIn {
    0% {
      opacity: 0;
      transform: translateY(20px);
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* ぐるぐるの下線スタイル */
.underline-text {
  position: relative;
  display: inline-block;
}

.underline-text::after {
  content: '';
  position: absolute;
  bottom: -5px; /* 位置を少し下げる */
  left: 0;
  width: 100%;
  height: 5px; /* 太さを増やす */
  background-color: var(--color-primary);
  border-radius: 2.5px;
}

/* グラデーションオーバーレイのための基本スタイル */
.gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none; /* 下の要素へのクリックを可能にする */
}

/* SP版のグラデーションオーバーレイ専用の追加スタイル */
@media (max-width: 767px) {
  .header__layout-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-gradient-sp);
    z-index: 8;
    pointer-events: none;
  }
}