/* ==============================
   共通
============================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  font-family: 'Noto Sans JP', sans-serif;
  background: #fff;
  color: #333;
  -webkit-text-size-adjust: 100%;
}

/* ==============================
   ヘッダー（ロゴ＋バナー）
============================== */
header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 140px;
  background: #004BB1;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  z-index: 10;
}

.logo-area {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
}

.logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  width: 300px;
  margin-left: 60px;
  margin-right: 20px;
}

.logo-fixed {
  height: 100px;
  width: auto;
  object-fit: contain;
}

/* 流れるバナー */
.flow-container {
  position: relative;
  overflow: hidden;
  flex: 1;
  height: 100px;
}

.flow-track {
  position: absolute;
  top: 0; left: 0;
  display: flex;
  align-items: center;
  height: 100%;
  gap: 20px;
  width: max-content;
  will-change: transform;
}

.flow-track img {
  height: 100px;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(0,0,0,0.25);
}

.banner-gap { width: 40px; flex-shrink: 0; }

/* ==============================
   スプリット
============================== */
body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
}

.split {
  position: relative;
  top: 180px;
  width: calc(50% - 30px);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: #000;
  box-shadow: 0 0 25px rgba(0,0,0,0.2);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.left { margin-right: 20px; }
.right { margin-left: 20px; }

/* スライド画像 */
.split img {
  position: absolute;
  top: 50%; left: 50%;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  filter: brightness(85%);
  transition: opacity 0.8s ease, filter 1.2s ease, transform 1.2s ease;
  opacity: 0;
}

.split img.active { opacity: 1; }

.split:hover img.active {
  filter: brightness(100%) saturate(120%);
  transform: translate(-50%, -50%) scale(1.03);
}

/* テキストオーバーレイ */
.overlay {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  z-index: 5;
  text-align: center;
  color: #fff;
  text-shadow: 0 0 15px rgba(0,0,0,0.6);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  pointer-events: auto; /* iOSのクリック問題を解消 */
}

.overlay h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  white-space: nowrap;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border: 2px solid #fff;
  border-radius: 8px;
  background-color: rgba(255,255,255,0.15);
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn:hover {
  background: #fff;
  color: #000;
}

/* ==============================
   スマホ対応
============================== */
@media (max-width: 768px) {
  header {
    height: auto;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 0 5px;
  }

  .logo-area {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto;
  }

  .logo-box {
    width: 180px;
    margin: 0 auto 8px auto;
    height: 70px;
  }

  .logo-fixed { height: 70px; }

  .flow-container {
    width: 100%;
    height: 70px;
  }

  .flow-track {
    height: 70px;
    gap: 16px;
  }

  .flow-track img { height: 70px; }

  .banner-gap { width: 30px; }

  .split {
    top: 150px;
    width: 92%;
    margin: 25px 0;
  }

  .overlay h1 { font-size: 1.4rem; }

  .btn { padding: 10px 24px; }
}

/* 古いiOSのaspect-ratio非対応対策 */
@supports not (aspect-ratio: 4 / 3) {
  .split { height: auto; }
  .split::before {
    content: "";
    display: block;
    padding-top: 75%;
  }
  .split > img,
  .split > .overlay {
    position: absolute;
    inset: 0;
  }
}