/* =============================
   HEROセクション（共通）
============================= */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  color: #fff;
  font-family: 'Noto Sans JP', sans-serif;
}

/* 背景画像 */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 65%; /* 建物を中央〜やや下寄せに固定 */
  z-index: 1;
}

/* 左半分のオーバーレイ */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 2;
}

/* テキストエリア */
.hero-content {
  position: absolute;
  top: 50%;
  left: 6%;
  transform: translateY(-50%);
  z-index: 3;
  max-width: 540px;
}

.hero-logo {
  width: 120px;
  margin-bottom: 35px;
}

.hero-content h1 {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 25px;
}

.hero-content p {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.8;
}

.highlight {
  color: #f15a24;
}

/* =============================
   PC右側固定エリア
============================= */
.floating-area {
  position: absolute;
  right: 40px;
  bottom: 40px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 25px;
  z-index: 5;
}

.floating-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

.btn-float {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
}

.btn-float img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-float:hover {
  transform: scale(1.05);
}

/* === バナー（左側） === */
.floating-banner {
  display: flex;
  align-items: flex-end;
}

.floating-banner img {
  width: 400px;
  height: auto;
}

/* =============================
   Contents Menu セクション
============================= */
.contents-menu-section {
  position: relative;
  padding: 60px 20px;
  text-align: center;
  overflow: hidden;
}

/* 背景画像 */
.contents-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("https://megabox-nasu.com/wp-content/uploads/2025/11/contents-menu_back.png");
  background-size: cover;
  background-position: center;
  opacity: 0.95;
  z-index: 1;
}

/* 見出し */
.contents-header {
  position: relative;
  z-index: 2;
  margin-bottom: 20px;
}

.contents-next {
  font-size: 21px;
  color: #333;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.contents-title {
  font-size: 48px;
  font-weight: 800;
  color: #333;
  letter-spacing: 0.05em;
}

/* パネルグリッド */
.contents-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
}

.content-item {
  display: block;
  overflow: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.content-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.content-item:hover img {
  transform: scale(1.05);
}

/* =============================
   お悩みセクション
============================= */
.worries-section {
  background: #fff;
  padding: 60px 20px 40px;
}

.worries-section .inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* タイトル */
.ttl-pc {
  display: block;
  margin: 0 auto 50px;
  width: 1000px;
  max-width: 90%;
}

.ttl-sp {
  display: none;
  width: 95%;
  margin: 0 auto 15px;
}

/* お悩み一覧 */
.worries-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 40px;
}

.worry-item {
  width: 250px;
  max-width: 100%;
  text-align: left;
  position: relative;
}

/* 丸いフレーム */
.worry-circle {
  position: relative;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: #f6f6f6;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-sizing: border-box;
}

.worry-circle p {
  font-size: 17px;
  line-height: 1.5;
  color: #333;
  font-weight: 700;
  padding-left: 3px;
}

.worry-circle .em {
  color: #d33;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* 人物アイコン（右下） */
.worry-icon {
  position: absolute;
  bottom: -20px;
  right: -15px;
  width: 80px;
  height: auto;
  border-radius: 50%;
  z-index: 2;
}

/* 下線 */
.worries-line {
  display: block;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

/* =====================================
   SOLUTION セクション（修正版）
===================================== */
.solution-section {
  background: #cfcfcf;
  padding: 60px 20px 30px;
  position: relative;
  overflow: hidden;
  color: #333; /* 全体文字色を白系ベースに */
}

/* 内側ラッパー */
.solution-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* 左の縦帯（MEGA BOX装飾） */
/* === 左の縦文字「MEGA BOX」2段構成 === */
.solution-left-wrap {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 700px; /* 横幅を固定して扱いやすく */
  z-index: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
}

.solution-left-wrap img {
  width: auto;
  height: 48%;
  object-fit: contain;
  margin-left: -15%; /* 左に少しはみ出す感じで配置 */
}


/* タイトル */
.solution-title {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
  z-index: 2;
}

.solution-ttl-pc {
  width: 900px;
  max-width: 95%;
  margin: 0 auto;
}

.solution-ttl-sp {
  display: none !important;
}

/* PC用グリッド */
.solution-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
  z-index: 2;
}

/* 各項目 */
.solution-item {
  text-align: center;
  color: #f3f3f3;
}

.solution-item img {
  width: 180px;
  margin: 0 auto 25px;
  display: block;
  padding-left: 5px;
}


/* === SOLUTION項目タイトル（h3）カラー交互設定 === */
.solution-item:nth-child(1) h3,
.solution-item:nth-child(3) h3,
.solution-item:nth-child(5) h3 {
  color: #7d8c45; /* グリーン */
}

.solution-item:nth-child(2) h3,
.solution-item:nth-child(4) h3,
.solution-item:nth-child(6) h3 {
  color: #F5A623; /* オレンジ */
}

.solution-item h3 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 12px;
}

.solution-item p {
  font-size: 17px;
  line-height: 1.6;
  font-weight: 500;
  color: #494949;
  max-width: 300px;
  margin: 0 auto;
  text-align: left;
}

/* =====================================
   スマホスライダー（非表示）
===================================== */
.solution-slider {
  display: none !important;
}

/* =============================
   Instagram GALLERY セクション
============================= */
.p-gallery {
  background: #fff;
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.p-gallery-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 見出し ===== */
.p-gallery h2 {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #333;
  margin-bottom: 20px;
  position: relative;
}

.p-gallery h2::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  margin: 15px auto 0;
  background: linear-gradient(90deg, #ff7b00, #ff3c00);
  border-radius: 2px;
}

/* =============================
   TOPICS セクション（最終統一版）
============================= */
.p-topics {
  position: relative;
  background: url("https://megabox-nasu.com/wp-content/uploads/2025/11/topics-bg.webp") center/cover no-repeat;
  padding: 100px 0 0; /* 下部隣接を自然に */
  overflow: hidden;
}

/* --- 背景オーバーレイ --- */
.p-topics::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.75); /* 白の透過で背景を柔らかく */
  backdrop-filter: blur(4px);
  z-index: 0;
}

/* --- 内部レイアウト --- */
.p-topics-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 60px;
  position: relative;
  z-index: 2;
  padding: 0 30px;
}

/* --- 左ブロック --- */
.p-topics-left {
  flex: 0 0 25%;
  color: #222;
  padding-top: 20px;
}

.p-topics-ttl {
  font-size: 56px;
  font-weight: 900;
  color: #f15a24; /* HEROと統一オレンジ */
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  line-height: 1.1;
}

.p-topics-subttl {
  font-size: 22px;
  font-weight: 700;
  color: #333;
  display: block;
  margin-bottom: 35px;
  letter-spacing: 0.05em;
}

.p-topics-cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
  line-height: 2;
}

.p-topics-cat-list li {
  font-size: 18px;
  color: #333;
  font-weight: 600;
}

/* --- 右ブロック（かまぼこ型フレーム） --- */
.p-topics-right {
  flex: 0 0 70%;
  background: #fff;
  border-radius: 120px 120px 0 0; /* かまぼこ型に変更 */
  padding: 70px 80px 60px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  margin-top: auto;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* --- 投稿リスト --- */
.p-topics-post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.p-topics-post-item {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  padding: 18px 0;
  border-bottom: 1px dotted #bbb;
  gap: 14px;
}

.p-topics-date {
  font-size: 18px;
  color: #333;
  min-width: 110px;
  font-weight: 500;
}

.p-topics-cat {
  font-size: 18px;
  font-weight: 800;
  color: #f15a24;
  min-width: 90px;
}

.p-topics-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  flex: 1;
  line-height: 1.8;
}

/* --- view more --- */
.p-topics-more {
  text-align: right;
  margin-top: 45px;
  z-index: 2;
  position: relative;
}

.p-topics-viewmore img {
  width: 190px;
  height: auto;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.p-topics-viewmore:hover img {
  transform: translateX(6px);
  opacity: 0.9;
}

/* =============================
   ABOUT MEGABOX（再利用設計）
============================= */
.about-megabox {
  background: #fff;
  text-align: center;
  padding: 100px 20px 80px;
  font-family: 'Noto Sans JP', sans-serif;
  color: #333;
}

.about-megabox .inner {
  max-width: 1000px;
  margin: 0 auto;
}

/* --- ロゴ --- */
.about-logo img {
  width: 160px;
  margin-bottom: 15px;
}

/* --- 見出し --- */
.about-megabox h2 {
  /* 既存の .p-gallery h2 を継承 */
  font-size: 48px;
  font-weight: 800;
  color: #333;
  letter-spacing: 0.05em;
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}

.about-megabox h2::after {
  /* 既存のオレンジラインを流用 */
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  margin: 12px auto 0;
  background: #f15a24;
  border-radius: 2px;
}

/* --- 日本語タイトル --- */
.about-subtitle {
  font-size: 24px;
  font-weight: 700;
  color: #222;
  margin-bottom: 35px;
}

/* --- 本文 --- */
.about-text p {
  max-width: 900px;
  margin: 0 auto;
  font-size: 21px;
  line-height: 2.0;
  font-weight: 600;
  margin-bottom: 28px;
  letter-spacing: 0.03em;
}

/* --- ボタン群 --- */
.about-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 40px;
}

/* --- PC→SP共通オレンジボタン --- */
.btn-orange {
  display: inline-block;
  background: #f15a24;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  padding: 14px 34px;
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-orange:hover {
  background: #ff7b00;
  transform: translateY(-3px);
}

/* =============================
   MEGA BOXの4つの強み
============================= */
.strength-section {
  position: relative;
  overflow: hidden;
  padding: 100px 20px 80px;
  text-align: center;
  font-family: 'Noto Sans JP', sans-serif;
  color: #333;
}

/* 背景画像（SP/PC切り替え対応） */
.strength-bg {
  position: absolute;
  inset: 0;
  background: url("https://megabox-nasu.com/wp-content/uploads/2025/11/strength-bg-scaled.webp") center/cover no-repeat;
  z-index: 0;
}

/* 内部コンテンツ */
.strength-section .inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
}

/* タイトル */
.strength-title {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.highlight {
  color: #f15a24;
}

.strength-underline {
  width: 60px;
  height: 4px;
  background: #f15a24;
  border-radius: 2px;
  margin: 0 auto 60px;
}

/* 中央ロゴ円 */
.strength-center {
  width: 220px;
  height: 220px;
  margin: 0 auto 60px;
  border-radius: 50%;
  border: 3px solid #f15a24;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.8);
}

.strength-logo {
  width: 120px;
  height: auto;
}

/* グリッド配置 */
.strength-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  justify-content: center;
  align-items: start;
  margin: 0 auto 60px;
}

/* アイテム構造 */
.strength-item {
  text-align: center;
  color: #333;
}

.strength-circle {
  background: linear-gradient(135deg, #ff7b00, #ff3c00);
  width: 160px;
  height: 160px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  color: #fff;
}

.strength-circle img {
  width: 50px;
  margin-bottom: 10px;
  filter: brightness(0) invert(1);
}

.strength-circle h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.strength-item p {
  font-size: 15px;
  line-height: 1.8;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: 15px 18px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  max-width: 260px;
  margin: 0 auto;
}

/* ボタン */
.strength-btn-wrap {
  text-align: center;
}


/* =============================
   スマホ（768px以下）
============================= */
@media screen and (max-width: 768px) {
  /* === HERO === */
  .hero-section {
    height: 70vh;
  }

  .hero-bg {
    object-fit: cover;
    object-position: center 90%;
  }

  .hero-overlay {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
  }

  .hero-content {
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
  }

  .hero-logo {
    width: 60px;
    position: absolute;
    top: -60px;
    left: 10px;
    margin: 0;
  }

  .hero-content h1 {
    font-size: 36px;
    line-height: 1.35;
    margin-bottom: 10px;
  }

  .hero-content p {
    font-size: 14px;
    line-height: 1.6;
  }

  .floating-area {
    display: none;
  }

  .sp-bottom-area {
    position: absolute;
    bottom: -25%;
    width: 100%;
    text-align: center;
    z-index: 5;
  }

  .sp-banner {
    width: 75%;
    max-width: 380px;
    margin-bottom: 12px;
  }

  .more-arrow {
    font-size: 14px;
    color: #fff;
  }

  .more-arrow::after {
    content: "⌄";
    display: block;
    font-size: 22px;
    margin-top: 2px;
    animation: arrow-bounce 1.4s infinite;
  }

  @keyframes arrow-bounce {
    0%, 100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(5px);
    }
  }

  /* === Contents Menu (スマホ専用設定) === */
  .contents-grid {
    grid-template-columns: repeat(3, 1fr);
    /* ← 3カラム */
    gap: 15px;
    max-width: 95%;
    margin: 0 auto;
  }

  /* 7番目以降を非表示にする → 上6枚のみ表示 */
  .contents-grid .content-item:nth-child(n+7) {
    display: none;
  }

  /* 画像を正方形化 */
  .content-item img {
    aspect-ratio: 1 / 1;
    /* 正方形に維持 */
    object-fit: cover;
  }

  .contents-next {
    font-size: 18px;
    margin-bottom: 0px;
  }

  .contents-title {
    font-size: 28px;
  }

  /* === お悩みセクション === */
  .ttl-pc {
    display: none;
  }

  .ttl-sp {
    display: block;
  }

  .worries-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    justify-items: center;
    align-items: start;
    gap: 20px 10px; /* ← 横方向の空きを狭めて中央寄せ */
    margin: 0 auto 20px;
    max-width: 390px; /* ← 両端が空きすぎないように制限 */
  }

  .worry-item {
    width: 100%;
  }

  .worry-circle {
    width: 160px;
    height: 160px;
    padding: 10px;
    margin: 0 auto;
    position: relative;
  }

  .worry-circle p {
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
    margin: 0;
  }

  .worry-icon {
    width: 50px;
    bottom: -8px;
    right: -8px;
  }

  /* === 強調テキストにアンダーライン === */
  .worry-circle .em {
    color: #d33;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
  }

/* =============================
   SOLUTION スマホスライダー
============================= */
.solution-section {
  background: #f3f3f3 !important;
  padding: 0 auto 20px;
  color: #333;
}

.solution-slider {
  width: 100%;
  overflow: hidden;
  padding-bottom: 40px;
}

/* 各カード */
.solution-slider .swiper-slide {
  background: linear-gradient(180deg, #ff7b00 0%, #ff3c00 100%);
  border-radius: 24px;
  color: #fff;
  padding: 30px 24px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

/* タイトル */
.solution-slider .swiper-slide h3 {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
  position: relative;
}

/* 説明文 */
.solution-slider .swiper-slide p {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.9;
  color: #fff;
  margin: 0;
}

/* ドットナビゲーション */
.swiper-pagination-bullet {
  background: #ff7b00 !important;
  opacity: 0.5;
}

.swiper-pagination-bullet-active {
  background: #fff !important;
  opacity: 1;
}



  /* === PC要素を非表示、スマホ要素を表示 === */
  .solution-left {
    display: none !important;
  }

  .solution-ttl-pc {
    display: none !important;
  }

  .solution-ttl-sp {
    display: block !important;
    width: 90%;
    margin: -30px auto 10px;
  }

  /* PCグリッドは非表示 */
  .solution-grid {
    display: none !important;
  }

  /* スマホスライダーを表示 */
  .solution-slider {
    display: block !important;
  }

  .p-gallery {
    padding: 30px 0 20px;
  }

  .p-gallery h2 {
    font-size: 32px;
  }

  .p-gallery h2::after {
    width: 60px;
  }

  .p-topics {
    padding: 60px 0 0;
  }

  .p-topics-inner {
    flex-direction: column;
    gap: 25px;
    padding: 0 15px;
  }

  .p-topics-left {
    text-align: left;
  }

  .p-topics-ttl {
    font-size: 38px;
  }

  .p-topics-subttl {
    font-size: 18px;
  }

  .p-topics-cat-list li {
    font-size: 15px;
  }

  .p-topics-right {
    border-radius: 100px 100px 0 0;
    padding: 40px 25px 30px;
    margin-top: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  }

  .p-topics-date {
    font-size: 15px;
    min-width: 80px;
  }

  .p-topics-cat {
    font-size: 15px;
    min-width: 70px;
  }

  .p-topics-title {
    font-size: 16px;
    line-height: 1.7;
  }

  .p-topics-viewmore img {
    width: 150px;
  }

  .about-megabox {
    padding: 60px 20px;
  }
  .about-logo img {
    width: 90px;
  }
  .about-megabox h2 {
    font-size: 32px;
  }
  .about-subtitle {
    font-size: 18px;
  }
  .about-text p {
    font-size: 16px;
    line-height: 1.6;
    font-weight: 600;
  }
  .about-buttons {
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
  }

  .btn-orange {
    font-size: 14px;
    padding: 10px 5px;
    min-width: 28%; /* 横3つで並ぶ比率（約30%×3＋gap） */
    flex: 1 1 28%;
    box-sizing: border-box;
  }

  .strength-section {
    padding: 60px 20px;
  }

  .strength-bg {
    background: url("https://megabox-nasu.com/wp-content/uploads/2025/11/strength-bg-sp-scaled.webp") center/cover no-repeat;
  }

  .strength-title {
    font-size: 30px;
    margin-bottom: 5px;
  }

  .strength-underline {
    margin-bottom: 40px;
  }

  .strength-center {
    width: 160px;
    height: 160px;
    margin-bottom: 40px;
  }

  .strength-logo {
    width: 90px;
  }

  .strength-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px 15px;
  }

  .strength-circle {
    width: 130px;
    height: 130px;
  }

  .strength-circle img {
    width: 40px;
  }

  .strength-circle h3 {
    font-size: 14px;
  }

  .strength-item p {
    font-size: 14px;
    padding: 12px;
  }



/* =============================
   大画面（1600px以上）
============================= */
@media screen and (min-width: 1600px) {
  .hero-content h1 {
    font-size: 62px;
  }

  .hero-content p {
    font-size: 22px;
  }

  .hero-logo {
    width: 200px;
  }

  .floating-area {
    right: 20px;
    bottom: 30px;
    gap: 18px;
  }

  .btn-float {
    width: 110px;
    height: 110px;
  }

  .floating-banner img {
    width: 300px;
  }

  .contents-menu-section {
    padding: 60px 15px;
  }

  .contents-grid {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }

  .contents-title {
    font-size: 26px;
  }
}