/* ============================================
   common.css
   サイト全体の共通スタイル
   （ヘッダー・フッター・ボタン・Gutenbergブロックなど）
   ============================================ */


/* ============================================
   基本設定
   ============================================ */
html {
  overflow-x: clip;
}

body {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: clip;
}


/* ============================================
   コンテナ
   ============================================ */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}


/* ============================================
   セクション共通
   ============================================ */
section {
  padding: var(--section-padding);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  color: var(--color-text);
  margin-bottom: 16px;
}

.section-lead {
  text-align: center;
  color: var(--color-text-light);
  line-height: 2;
  margin-bottom: 48px;
}

.section-btn-wrap {
  text-align: center;
  margin-top: 48px;
}


/* ============================================
   ボタン共通
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 40px;
  border-radius: var(--border-radius-btn);
  font-size: 1rem;
  font-weight: 700;
  transition: background-color 0.2s ease, opacity 0.2s ease, transform 0.1s ease;
  cursor: pointer;
  text-align: center;
  min-width: 180px;
  text-decoration: none;
}

.btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

/* プライマリボタン（オレンジ） */
.btn--primary {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.btn--primary:hover {
  background-color: var(--color-primary-hover);
  opacity: 1;
}

/* アウトラインボタン */
.btn--outline {
  background-color: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn--outline:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
  opacity: 1;
}

/* ダークアウトラインボタン */
.btn--outline-dark {
  background-color: transparent;
  border: 2px solid var(--color-text);
  color: var(--color-text);
}

.btn--outline-dark:hover {
  background-color: var(--color-text);
  color: var(--color-white);
  opacity: 1;
}


/* ============================================
   ヘッダー
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--color-white);
  z-index: 100;
  transition: box-shadow 0.3s ease;
}

/* スクロール後：虹色ボーダー＋シャドウ */
@keyframes rainbow-slide {
  from { background-position: 0% 0%; }
  to   { background-position: 200% 0%; }
}

@media screen and (min-width: 769px) {
  /* スクロール後：浮遊ピル型ヘッダー */
  .site-header.is-scrolled {
    background-color: transparent;
    box-shadow: none;
    padding: 6px 16px;
  }

  .site-header.is-scrolled::after {
    display: none;
  }

  .site-header.is-scrolled .header-inner {
    height: 60px;
    border-radius: 50px;
    background-color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 0 28px;
  }

  .site-header.is-scrolled .site-logo img {
    height: 46px;
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 85px;
  transition: height 0.3s ease, border-radius 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

/* ロゴ */
.site-logo a {
  display: flex;
  align-items: center;
}

.site-logo img {
  height: 70px;
  width: auto;
  transition: height 0.3s ease;
}

@media screen and (max-width: 768px) {
  .site-logo img {
    height: 52px;
  }

  .site-header {
    background-color: transparent;
  }
}

.site-name {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--color-primary);
}

/* グローバルナビ */
.global-nav .nav-list {
  display: flex;
  gap: 24px;
  align-items: center;
}

.global-nav .nav-list li a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  transition: color 0.2s ease;
  position: relative;
}

.global-nav .nav-list li a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width 0.2s ease;
}

.global-nav .nav-list li a:hover {
  color: var(--color-primary);
}

.global-nav .nav-list li a:hover::after {
  width: 100%;
}

/* ハンバーガーボタン（SP用） */
.hamburger-btn {
  display: none;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 0;
}

.hamburger-icon {
  width: 44px;
  height: 44px;
  display: block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* open状態：回転してアニメーション */
.hamburger-btn.is-open .hamburger-icon {
  transform: rotate(90deg);
  opacity: 0.75;
}

/* ドロワーメニュー */
.drawer-menu {
  position: fixed;
  top: 70px;
  right: -100%;
  width: 280px;
  height: calc(100vh - 70px);
  background-color: var(--color-white);
  padding: 32px 24px;
  overflow-y: auto;
  transition: right 0.3s ease;
  z-index: 99;
}

.drawer-menu.is-open {
  right: 0;
}

.drawer-nav-list li {
  border-bottom: 1px solid var(--color-border);
}

.drawer-nav-list li a {
  display: block;
  padding: 14px 0;
  font-weight: 500;
  color: var(--color-text);
}

.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 98;
}

.drawer-overlay.is-visible {
  display: block;
}


/* ============================================
   ページヘッダー（下層ページ共通）
   ============================================ */
.page-head {
  padding: 120px 20px 140px;
  text-align: center;
  position: relative;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  z-index: 2;
}

.page-head {
  padding: 120px 20px 140px;
  text-align: center;
  position: relative;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  z-index: 2;
}

.page-head::before {
  content: "";
  display: block;
  position: absolute;
  bottom: -110px;
  left: 0;
  width: 100%;
  height: 120px;
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 100% auto;
}

/* 背景の装飾 */
.back img {
  width: 100vw;
  max-width: none;
  display: block;
}


/* ============================================
   フッター
   ============================================ */
.site-footer {
  background-color: #fbfaef;
  padding: 36px 0 28px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Row 1: メインナビ + SNSアイコン ---- */
.footer-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav-list li {
  display: flex;
  align-items: center;
}

.footer-nav-list li + li::before {
  content: "／";
  color: var(--color-text-light);
  font-size: 0.75rem;
  padding: 0 4px;
}

.footer-nav-list li a {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-nav-list li a:hover {
  color: var(--color-primary);
}

/* SNSアイコン */
.footer-sns {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.sns-link img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: block;
  transition: opacity 0.2s ease;
}

.sns-link:hover img {
  opacity: 0.75;
}

/* ---- Row 2: サブナビ ---- */
.footer-sub-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-sub-nav-list li a {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-sub-nav-list li a::before {
  content: "＞ ";
  color: var(--color-primary);
  font-size: 0.75rem;
}

.footer-sub-nav-list li a:hover {
  color: var(--color-primary);
}

/* ---- Row 3: 会社情報 + コピーライト ---- */
.footer-bottom {
  border-top: 1px solid #e8e7da;
  padding-top: 16px;
}

.footer-bottom-text {
  font-size: 0.75rem;
  color: var(--color-text-light);
  line-height: 1.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 900px) {
  .footer-bottom-text {
    white-space: normal;
  }
}

@media (max-width: 768px) {
  .footer-row-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-nav-list {
    gap: 2px 0;
  }

  .footer-sns {
    gap: 8px;
  }

  .footer-sub-nav-list {
    gap: 4px 20px;
  }
}

/* フッター装飾 */
.footer-texture-top {
  margin-top: 40px;
}

.footer-texture-top img {
  width: 100%;
  display: block;
}

.back img {
  width: 100%;
}


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

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-2px);
}

.back-to-top-arrow {
  font-size: 1.5rem;
  color: var(--color-white);
  line-height: 1;
}


/* ============================================
   アクセシビリティ
   ============================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-accent-teal);
  outline-offset: 2px;
  border-radius: 4px;
}


/* ============================================
   Gutenbergブロック共通スタイル
   ============================================ */
.wp-block-group,
.entry-content {
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding: 0 24px;
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.alignwide {
  width: calc(100% + 80px);
  max-width: calc(100% + 80px);
  margin-left: -40px;
  margin-right: -40px;
}

.wp-block-heading {
  font-family: var(--font-main);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.4;
}

.wp-block-paragraph {
  font-family: var(--font-main);
  line-height: var(--line-height-base);
  color: var(--color-text);
}

.wp-block-button__link {
  background-color: var(--color-primary) !important;
  color: var(--color-white) !important;
  border-radius: var(--border-radius-btn) !important;
  font-weight: 700;
  padding: 14px 40px !important;
  transition: background-color 0.2s ease;
}

.wp-block-button__link:hover {
  background-color: var(--color-primary-hover) !important;
}

.wp-block-image img {
  border-radius: 12px;
}

.wp-block-columns {
  gap: 32px;
}

.wp-block-cover {
  border-radius: var(--border-radius-card);
  overflow: hidden;
}

.wp-block-table td,
.wp-block-table th {
  border-color: var(--color-border);
  padding: 12px 16px;
}

.wp-block-separator {
  border-color: var(--color-border);
}

.wp-block-group {
  padding: 60px 24px;
}


/* ============================================
   ユーティリティ
   ============================================ */

/* セクション背景 */
.section-cream  { background-color: var(--color-bg);        padding: 80px 0; }
.section-white  { background-color: var(--color-white);     padding: 80px 0; }
.section-green  { background-color: var(--color-secondary); padding: 80px 0; }
.section-orange { background-color: var(--color-primary);   padding: 80px 0; }

.section-heading {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-text);
}

.section-desc {
  text-align: center;
  color: var(--color-text-light);
  line-height: 2;
  margin-bottom: 48px;
}

/* バッジ */
.badge {
  display: inline-block;
  background-color: var(--color-accent-yellow);
  color: var(--color-text);
  font-size: 0.875rem;
  font-weight: 700;
  padding: 6px 20px;
  border-radius: 50px;
  margin-bottom: 16px;
}

.badge--primary {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.badge--green {
  background-color: var(--color-secondary);
  color: var(--color-white);
}

/* テキスト */
.text-center { text-align: center; }

/* マージン */
.mt-0  { margin-top: 0; }
.mt-16 { margin-top: 16px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-0  { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.mb-32 { margin-bottom: 32px; }


/* ============================================
   スマホ固定フッターCTAバー
   ============================================ */
.sp-cta-bar {
  display: none;
}

@media screen and (max-width: 767px) {
  .sp-cta-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.12);
  }

  .sp-cta-bar a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 8px;
    border-radius: 14px;
    font-family: 'Zen Maru Gothic', sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.3;
    text-align: center;
    transition: opacity 0.2s, transform 0.1s;
  }

  .sp-cta-bar a:active {
    opacity: 0.8;
    transform: scale(0.97);
  }

  .sp-cta-bar .cta-visit {
    background-color: #e05555;
    color: #fff;
  }

  .sp-cta-bar .cta-recruit {
    background-color: #e8b020;
    color: #fff;
  }

  /* 固定バー分の余白をbodyに確保 */
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }
}
.mb-48 { margin-bottom: 48px; }

/* Instagramアイコン */
.sns-instagram img {
  width: 30px;
  height: 30px;
  border-radius: 0;
}
