/* ============================================================
   common.css - 便利屋ウェアレント 共通スタイル
   ============================================================ */

/* ------------------------------------------------------------
   Google Fonts
   ------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Rounded+Mplus+1c:wght@400;500;700;800&family=Noto+Sans+JP:wght@400;500;700;900&display=swap');


/* ------------------------------------------------------------
   CSS Variables
   ------------------------------------------------------------ */
:root {
  /* Colors */
  --color-bg-light:    #FDFEE4;   /* 背景の薄い黄色 */
  --color-bg-mid:      #FFFBAE;   /* やや濃い黄色 */
  --color-bg-yellow:   #FFF07A;   /* 濃い黄色 */
  --color-orange:      #FF8D28;   /* オレンジ */
  --color-red:         #FE4346;   /* 赤 */
  --color-green:       #06C755;   /* 緑（LINE） */
  --color-navy:        #1A237E;   /* 紺 */
  --color-dark:        #333333;   /* 黒 */
  --color-white:       #FFFFFF;

  /* Typography */
  --font-rounded:  'Rounded Mplus 1c', sans-serif;
  --font-noto:     'Noto Sans JP', sans-serif;

  /* Font Sizes */
  --fs-title-lg:   90px;    /* タイトル大 */
  --fs-title-sm:   60px;    /* タイトル小 */
  --fs-body:       24px;    /* 本文 */
  --fs-nav:        19px;    /* ナビ */
  --fs-btn-hd-lg:  24px;    /* ヘッダーボタン大文字 */
  --fs-btn-hd-sm:  14px;    /* ヘッダーボタン小文字 */
  --fs-btn-black:  24px;    /* 黒ボタン */

  /* Line Height */
  --lh-body: 36px;

  /* Layout */
  --max-width:     1200px;
  --gutter-pc:     40px;    /* PC左右余白 */
  --gutter-sp:     24px;    /* SP左右余白 */

  /* Spacing */
  --section-py-pc: 80px;
  --section-py-sp: 48px;

  /* Header */
  --header-h-pc:   80px;
  --header-h-sp:   60px;

  /* Border Radius */
  --radius-btn-hd:    0 0 10px 10px;   /* ヘッダーボタン（下左右のみ） */
  --radius-btn-black: 9999px;           /* 黒ボタン（完全丸） */
  --radius-card:      10px;
}


/* ------------------------------------------------------------
   Reset / Base
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 140px; /* ヘッダー+ナビ分のオフセット */
}

body {
  font-family: var(--font-noto);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-dark);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

/* SP基本文字サイズ（高齢者向け：18px以下にしない） */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 80px; /* SP：ヘッダーのみ（ナビなし） */
  }
  body {
    font-size: 18px;
    line-height: 32px;
  }
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}


/* ------------------------------------------------------------
   Layout Utilities
   ------------------------------------------------------------ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter-pc);
}

.section {
  padding: var(--section-py-pc) 0;
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--gutter-sp);
  }
  .section {
    padding: var(--section-py-sp) 0;
  }
}


/* ------------------------------------------------------------
   Typography
   ------------------------------------------------------------ */
.title-lg {
  font-family: var(--font-rounded);
  font-size: var(--fs-title-lg);
  font-weight: 800;
  line-height: 1.2;
}

.title-sm {
  font-family: var(--font-rounded);
  font-size: var(--fs-title-sm);
  font-weight: 800;
  line-height: 1.2;
}

.body-text {
  font-family: var(--font-noto);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

@media (max-width: 768px) {
  .title-lg { font-size: 42px; }   /* PC90px → SP42px（縮小しすぎず視認性確保） */
  .title-sm { font-size: 32px; }   /* PC60px → SP32px */
  .body-text { font-size: 18px; line-height: 32px; } /* 本文は18px以下にしない */
}


/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */

/* --- ヘッダーボタン共通 --- */
.btn-header {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 240px;
  height: 80px;
  border-radius: var(--radius-btn-hd);
  border: none;
  cursor: pointer;
  text-align: center;
  line-height: 1.3;
  font-family: var(--font-rounded);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.btn-header:hover {
  opacity: 0.85;
}

.btn-header .btn-sub {
  font-size: var(--fs-btn-hd-sm);
  font-weight: 500;
}

.btn-header .btn-main {
  font-family: var(--font-noto);
  font-weight: 700;
  font-size: var(--fs-btn-hd-lg); /* 24px */
}

/* ヘッダーボタン カラーバリエーション */
.btn-header--red {
  background-color: var(--color-red);
  color: var(--color-white);
}

.btn-header--green {
  background-color: var(--color-green);
  color: var(--color-white);
}

.btn-header--navy {
  background-color: var(--color-navy);
  color: var(--color-white);
}

/* --- 黒ボタン --- */
.btn-black {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 26px 70px;
  background-color: var(--color-dark);
  color: var(--color-white);
  border-radius: var(--radius-btn-black);
  border: none;
  cursor: pointer;
  font-family: var(--font-noto);
  font-size: var(--fs-btn-black);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.btn-black:hover {
  opacity: 0.8;
}

@media (max-width: 768px) {
  .btn-header {
    width: 100%;
    height: 64px;
  }
  .btn-black {
    padding: 20px 40px;
    font-size: 18px;
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
    line-height: 1.5;
  }
}


/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #FDFEE4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter-pc);
  height: var(--header-h-pc);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-dark);
  flex-shrink: 0;
}

.header__logo img {
  height: 48px;
  width: auto;
}

.header__logo-name {
  font-family: var(--font-rounded);
  font-size: 34px;
  font-weight: 800;
  white-space: nowrap;
}

.header__buttons {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

/* SP ハンバーガーメニューボタン */
.header__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.header__hamburger span {
  display: block;
  width: 28px;
  height: 2px;
  background-color: var(--color-dark);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.header__hamburger.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.header__hamburger.is-open span:nth-child(2) {
  opacity: 0;
}
.header__hamburger.is-open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
  .header__inner {
    height: var(--header-h-sp);
    padding: 0 var(--gutter-sp);
  }
  /* PCボタンを隠す */
  .header__buttons {
    display: none;
  }
  /* ハンバーガーを表示 */
  .header__hamburger {
    display: flex;
    flex-shrink: 0; /* 絶対に縮まないよう固定 */
  }
  /* PCナビを隠す */
  .nav:not(.nav--drawer) {
    display: none;
  }
  /* ロゴ画像を小さく */
  .header__logo img {
    height: 36px;
  }
  /* ロゴ文字を縮小＋はみ出し防止 */
  .header__logo-name {
    font-size: clamp(16px, 5vw, 34px); /* 画面幅に応じて16px〜34pxで自動調整 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  /* ロゴエリアがハンバーガーを圧迫しないよう制限 */
  .header__logo {
    min-width: 0;
    flex-shrink: 1;
    overflow: hidden;
  }
}


/* ------------------------------------------------------------
   Navigation
   ------------------------------------------------------------ */
.nav {
}

.nav__list {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter-pc);
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav__item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* 両端・アイテム間の線：文字高さに揃える */
.nav__item::before,
.nav__item::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 1em; /* フォントサイズと同じ高さ */
  background-color: var(--color-dark);
}

.nav__item::before { left: 0; }   /* 各アイテムの左に線 */
.nav__item:last-child::after { right: 0; } /* 最後のアイテムの右にも線 */

/* 最初以外はbeforeを非表示（重複防止） */
.nav__item:not(:first-child)::before {
  display: none;
}

/* アイテム間の線はafter（右端）とnext-siblingのbefore代わりにborder使用 */
.nav__item + .nav__item {
  border-left: 1px solid var(--color-dark);
}

/* ただしborder-leftは全高になるのでリセットし、afterで代用 */
.nav__item + .nav__item {
  border-left: none;
}

.nav__item::after {
  right: 0;
  display: block;
}

/* 最初のアイテムの左端 */
.nav__item:first-child::before {
  display: block;
}

.nav__item a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 12px 8px;
  font-family: var(--font-noto);
  font-size: var(--fs-nav);
  font-weight: 500;
  color: var(--color-dark);
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
  text-align: center;
}

.nav__item a:hover,
.nav__item a.is-active {
  color: var(--color-orange);
}

/* ドロワー内の区切り線を非表示 */
.nav--drawer .nav__item::before,
.nav--drawer .nav__item::after {
  display: none;
}

/* SP ドロワーナビ */
.nav--drawer {
  display: none;
  position: fixed;
  top: var(--header-h-sp);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-white);
  z-index: 999;
  overflow-y: auto;
  padding: 24px var(--gutter-sp);
}

.nav--drawer.is-open {
  display: block;
}

.nav--drawer .nav__list {
  flex-direction: column;
  align-items: flex-start;
  padding: 0;
  gap: 0;
}

.nav--drawer .nav__item {
  width: 100%;
  border-bottom: 1px solid #eee;
}

.nav--drawer .nav__item a {
  padding: 16px 0;
  font-size: 18px;
}

.nav--drawer .nav__buttons {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav--drawer .btn-header {
  width: 100%;
  height: 64px;
  border-radius: 8px;
}

@media (min-width: 769px) {
  .nav--drawer { display: none !important; }
}


/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.footer {
  background-color: var(--color-dark);
  color: var(--color-white);
  padding: 0;
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px var(--gutter-pc);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.footer__nav-col {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  align-self: center;
  flex-shrink: 0;
}

.footer__nav-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer__nav-group a {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-white);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.footer__nav-group a::before {
  content: '▶';
  font-size: 10px;
  flex-shrink: 0;
}

.footer__nav-group a:hover {
  color: var(--color-bg-yellow);
}

.footer__logo-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  flex-shrink: 0;
}

.footer__logo-col img {
  width: 217px;
  height: 129px;
  object-fit: contain;
}

.footer__logo-col p {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-noto);
  color: var(--color-white);
}

/* 右カラム：住所・SNS・コピーライト */
.footer__info-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex-shrink: 0;
}

.footer__info-col p {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.6;
  white-space: nowrap;
}

.footer__info-col p {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.6;
}

.footer__sns {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.footer__sns a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  transition: opacity 0.2s;
}

.footer__sns a:hover {
  opacity: 0.7;
}

.footer__sns img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.footer__copy {
  font-size: 12px !important;
  font-weight: 400 !important;
  color: rgba(255,255,255,0.6);
  margin-top: 8px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .footer {
    padding: 0;
  }
  .footer__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px var(--gutter-sp);
    gap: 24px;
  }
  .footer__nav-col {
    justify-content: center;
    gap: 32px;
  }
  .footer__nav-group {
    align-items: flex-start;
  }
  .footer__logo-col {
    order: -1; /* ロゴを一番上に */
  }
  .footer__logo-col img {
    width: 160px;
    height: auto;
  }
  .footer__info-col {
    align-items: center;
    white-space: normal;
  }
  .footer__info-col p {
    white-space: normal;
    text-align: center;
  }
  .footer__sns {
    justify-content: center;
  }
  .footer__copy {
    text-align: center;
    white-space: normal;
  }
}


/* ------------------------------------------------------------
   CTA Section（共通「お気軽にご相談ください！」）
   ------------------------------------------------------------ */
.cta-section {
  background-color: var(--color-bg-mid);
  padding: var(--section-py-pc) 0;
  text-align: center;
}

.cta-section__title {
  font-family: var(--font-rounded);
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 32px;
  color: var(--color-dark);
}

.cta-section__buttons {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .cta-section {
    padding: var(--section-py-sp) 0;
  }
  .cta-section__title {
    font-size: 24px;
    margin-bottom: 24px;
  }
  .cta-section__buttons {
    flex-direction: column;
    align-items: stretch;
    padding: 0 var(--gutter-sp);
    gap: 12px;
  }
  .cta-section__buttons .btn-header {
    border-radius: 8px;
  }
}


/* ------------------------------------------------------------
   Section Title（共通セクション見出し）
   ------------------------------------------------------------ */
.section-title {
  font-family: var(--font-rounded);
  font-size: 42px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 48px;
  color: var(--color-dark);
}

.section-title--left {
  text-align: left;
}

@media (max-width: 768px) {
  .section-title {
    font-size: 28px;
    margin-bottom: 32px;
  }
}


/* ------------------------------------------------------------
   Category Title（黄色帯の見出し：service・aboutページ共通）
   ------------------------------------------------------------ */
.category-title {
  background-color: var(--color-bg-mid);
  border-radius: 16px;
  text-align: center;
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
}

.category-title span {
  font-family: var(--font-rounded);
  font-size: 48px;
  font-weight: 800;
  color: var(--color-dark);
}

@media (max-width: 768px) {
  .category-title {
    height: 80px;
    margin-bottom: 24px;
  }
  .category-title span {
    font-size: 26px;
  }
}


/* ------------------------------------------------------------
   Card（共通カード）
   ------------------------------------------------------------ */
.card {
  background-color: var(--color-white);
  border: 2px solid var(--color-bg-yellow);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.card__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card__body {
  padding: 16px;
}

.card__label {
  display: inline-block;
  background-color: var(--color-bg-yellow);
  color: var(--color-dark);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.card__date {
  font-size: 13px;
  color: #888;
  margin-bottom: 6px;
}

.card__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
}

.card__text {
  font-size: 14px;
  line-height: 1.6;
  color: #555;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* ------------------------------------------------------------
   Page Hero（各ページのヒーロービジュアル）
   ------------------------------------------------------------ */
.page-hero {
  position: relative;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--color-bg-mid);
}

.page-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.page-hero__title {
  position: relative;
  z-index: 1;
  font-family: var(--font-rounded);
  font-size: 48px;
  font-weight: 800;
  color: var(--color-dark);
  text-shadow: 0 2px 8px rgba(255,255,255,0.6);
}

@media (max-width: 768px) {
  .page-hero {
    height: 160px;
  }
  .page-hero__title {
    font-size: 32px;
  }
}


/* ------------------------------------------------------------
   Utilities
   ------------------------------------------------------------ */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.fw-bold   { font-weight: 700; }
.fw-black  { font-weight: 900; }

.color-orange { color: var(--color-orange); }
.color-red    { color: var(--color-red); }
.color-navy   { color: var(--color-navy); }

.bg-light     { background-color: var(--color-bg-light); }
.bg-mid       { background-color: var(--color-bg-mid); }
.bg-yellow    { background-color: var(--color-bg-yellow); }

.sp-only { display: none; }
.pc-only { display: block; }
br.sp-only { display: none; }

@media (max-width: 768px) {
  .sp-only { display: block; }
  .pc-only { display: none; }
  br.sp-only { display: block; }
}


/* ------------------------------------------------------------
   Scroll Animations（animation.jsと連動）
   ------------------------------------------------------------ */

/* 下からフェイドイン */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* 左からスライドイン */
.slide-in-left {
  opacity: 0;
  transform: translateX(-80px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* 右からスライドイン */
.slide-in-right {
  opacity: 0;
  transform: translateX(80px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* 発火後の状態（共通） */
.fade-in-up.is-visible,
.slide-in-left.is-visible,
.slide-in-right.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* ページ読み込み時アニメーション（ヒーロー用） */
.hero-slide-left {
  opacity: 0;
  transform: translateX(-80px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide-right {
  opacity: 0;
  transform: translateX(80px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-badge-in {
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-slide-left.is-visible,
.hero-slide-right.is-visible,
.hero-badge-in.is-visible {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* ヒーローバッジ パルスアニメーション */
@keyframes badge-pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.hero-badge-pulse {
  animation: badge-pulse 2s ease-in-out infinite;
}

/* ページ読み込みアニメーションと併用する場合 */
.hero-badge-in.hero-badge-pulse.is-visible {
  animation: badge-pulse 2s ease-in-out infinite;
}

/* staggerアイテム（stagger-groupと組み合わせて使用） */
.stagger-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* stagger用遅延クラス */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }
.delay-7 { transition-delay: 0.7s; }

/* ------------------------------------------------------------
   ページトップへ戻るボタン
   ------------------------------------------------------------ */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 24px;
  width: 56px;
  height: 56px;
  background-color: var(--color-orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 800;
  text-decoration: none;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  opacity: 0.85;
}

.back-to-top::after {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  border-top: 3px solid var(--color-white);
  border-right: 3px solid var(--color-white);
  transform: rotate(-45deg) translateY(3px);
  border-radius: 1px;
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
  }
}