/* =====================================================
   受注者向けTOP拡張スタイル（worker.php）
   - HEROスライダー化
   - カテゴリカルーセル
   - 選べる働き方／機能満載／安心の仕組み
   - ページ全体の薄いグラデーション背景
===================================================== */

:root {
  --wx-primary: #1e3a8a;
  --wx-primary-dark: #142a66;
  --wx-accent: #efac12;
  --wx-text: #1a1a1a;
  --wx-text-sub: #4a5a72;
  --wx-text-muted: #6b7a8f;
  --wx-bg: #f7f9fc;
  --wx-border: #e2e7ee;
}

/* =====================================================
   背景：薄いグラデーション（ゆっくり動く）
   コーポレートサイトのメインビジュアルのトーン
===================================================== */
.worker-bg-gradient {
  position: relative;
  background: linear-gradient(
    135deg,
    #f5f9ff 0%,
    #eef4fc 25%,
    #f8f5ff 50%,
    #f0f6ff 75%,
    #fdf9f3 100%
  );
  background-size: 400% 400%;
  animation: wxBgFlow 24s ease-in-out infinite;
}
@keyframes wxBgFlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* HEROだけ少し透過させ、背景がうっすら透けるようにする */
.worker-bg-gradient .hero-worker,
.worker-bg-gradient .section {
  background-color: transparent !important;
}
.worker-bg-gradient .section-bg {
  background-color: rgba(255, 255, 255, 0.55) !important;
  backdrop-filter: blur(2px);
}

/* =====================================================
   HEROスライダー化（右側）
===================================================== */
.hero-slider {
  position: relative;
  width: 100%;
  max-width: 540px;
  height: 100%;
  min-height: 480px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(30, 58, 138, 0.15);
}
/* HERO右側コンテナを左側と同じ高さに伸ばす */
.hero-worker .hero-visual {
  display: flex;
  align-items: stretch;
  height: 100%;
}
.hero-worker .hero-inner {
  align-items: stretch;
}
@media (max-width: 900px) {
  .hero-slider {
    min-height: 320px;
    aspect-ratio: 4 / 3;
  }
}
.hero-slider-track {
  position: relative;
  width: 100%;
  height: 100%;
}
.hero-slider-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  pointer-events: none;
}
.hero-slider-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.hero-slider-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* 画像未設置時のプレースホルダ */
.hero-slider-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, #eef4fc 0%, #f8f5ff 100%);
  color: var(--wx-text-muted);
  font-size: 13px;
}
.hero-slider-placeholder-num {
  font-size: 48px;
  font-weight: 800;
  color: var(--wx-primary);
  opacity: 0.3;
}

/* インジケーター（小さい丸） */
.hero-slider-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}
.hero-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(30, 58, 138, 0.3);
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}
.hero-slider-dot.is-active {
  background: var(--wx-primary);
  border-color: var(--wx-primary);
  width: 24px;
  border-radius: 100px;
}

/* =====================================================
   カテゴリカルーセル（HERO直後）
===================================================== */
.wx-categories-section {
  padding: 56px 0;
  overflow: hidden;
}
.wx-categories-head {
  text-align: center;
  margin-bottom: 32px;
  padding: 0 20px;
}
.wx-categories-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--wx-accent);
  margin: 0 0 8px;
}
.wx-categories-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--wx-primary);
  margin: 0 0 12px;
  line-height: 1.4;
}
.wx-categories-subtitle {
  font-size: 14px;
  color: var(--wx-text-sub);
  margin: 0;
  line-height: 1.8;
}
@media (max-width: 600px) {
  .wx-categories-title { font-size: 22px; }
}

/* 横スクロールカルーセル（自動スクロール） */
.wx-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 16px 0;
}
.wx-carousel-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: wxCarouselScroll 40s linear infinite;
}
.wx-carousel:hover .wx-carousel-track {
  animation-play-state: paused;
}
@keyframes wxCarouselScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.wx-carousel-card {
  flex-shrink: 0;
  width: 218px;
  background: #fff;
  border: 1px solid var(--wx-border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--wx-text);
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
}
.wx-carousel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(30, 58, 138, 0.12);
}
.wx-carousel-card-image {
  width: 218px;
  height: 183px;
  background: linear-gradient(135deg, #eef4fc 0%, #f8f5ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  overflow: hidden;
}
.wx-carousel-card-image img {
  width: 218px;
  height: 183px;
  object-fit: cover;
  display: block;
}
.wx-carousel-card-body {
  padding: 14px 16px;
}
.wx-carousel-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--wx-text);
  margin: 0 0 4px;
}
.wx-carousel-card-sub {
  font-size: 11px;
  color: var(--wx-text-muted);
  margin: 0;
}

/* =====================================================
   選べる働き方（4カード）
===================================================== */
.wx-worklife-section {
  padding: 72px 0;
}
.wx-worklife-head {
  text-align: center;
  margin-bottom: 40px;
}
.wx-worklife-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--wx-accent);
  margin: 0 0 8px;
}
.wx-worklife-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--wx-primary);
  margin: 0 0 12px;
}
.wx-worklife-subtitle {
  font-size: 14px;
  color: var(--wx-text-sub);
  margin: 0;
  line-height: 1.8;
}
@media (max-width: 600px) {
  .wx-worklife-title { font-size: 22px; }
}

.wx-worklife-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .wx-worklife-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .wx-worklife-grid { grid-template-columns: 1fr; }
}

.wx-worklife-card {
  background: #fff;
  border: 1px solid var(--wx-border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.wx-worklife-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(30, 58, 138, 0.1);
}
.wx-worklife-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #eef4fc 0%, #fdf9f3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}
.wx-worklife-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.wx-worklife-card-body {
  padding: 20px 18px;
}
.wx-worklife-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--wx-primary);
  margin: 0 0 8px;
}
.wx-worklife-card-text {
  font-size: 13px;
  color: var(--wx-text-sub);
  line-height: 1.8;
  margin: 0;
}

/* =====================================================
   仕事獲得を支援する機能が満載（3カード）
===================================================== */
.wx-features-section {
  padding: 72px 0;
}
.wx-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) {
  .wx-features-grid { grid-template-columns: 1fr; gap: 16px; }
}

.wx-feature-row {
  display: grid;
  grid-template-columns: 1fr;
  background: #fff;
  border: 1px solid var(--wx-border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.wx-feature-row:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(30, 58, 138, 0.1);
}
.wx-feature-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #f0f6ff 0%, #eef4fc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}
.wx-feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.wx-feature-body {
  padding: 20px 20px 24px;
}
.wx-feature-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--wx-primary);
  margin: 0 0 10px;
}
.wx-feature-text {
  font-size: 13px;
  color: var(--wx-text-sub);
  line-height: 1.9;
  margin: 0;
}

/* =====================================================
   安心してご利用できる仕組み（3カード）
===================================================== */
.wx-safety-section {
  padding: 72px 0;
}
.wx-safety-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .wx-safety-grid { grid-template-columns: 1fr; }
}
.wx-safety-card {
  background: #fff;
  border: 1px solid var(--wx-border);
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.wx-safety-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(30, 58, 138, 0.1);
}
.wx-safety-image {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #eef4fc 0%, #f8f5ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}
.wx-safety-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.wx-safety-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--wx-primary);
  margin: 0 0 10px;
}
.wx-safety-text {
  font-size: 13px;
  color: var(--wx-text-sub);
  line-height: 1.9;
  margin: 0;
}

/* セクション共通ヘッダー */
.wx-section-head {
  text-align: center;
  margin-bottom: 40px;
}
.wx-section-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--wx-accent);
  margin: 0 0 8px;
}
.wx-section-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--wx-primary);
  margin: 0 0 12px;
  line-height: 1.4;
}
.wx-section-subtitle {
  font-size: 14px;
  color: var(--wx-text-sub);
  margin: 0;
  line-height: 1.8;
}
@media (max-width: 600px) {
  .wx-section-title { font-size: 22px; }
}

/* =====================================================
   HERO「AI案件を探す」ボタン カスタマイズ
   デフォルト：白地・濃紺文字 / ホバー：濃紺背景・白文字
===================================================== */
.hero-worker .hero-cta .btn-outline {
  background: #ffffff !important;
  color: #0c2d5e !important;
  border-color: #0c2d5e !important;
}
.hero-worker .hero-cta .btn-outline:hover {
  background: #0c2d5e !important;
  color: #ffffff !important;
  border-color: #0c2d5e !important;
}

/* =====================================================
   スマホ対応の修正（横スクロール防止＋HEROレイアウト）
===================================================== */

/* ページ全体で横スクロール防止 */
.worker-bg-gradient {
  overflow-x: hidden;
}

/* HERO スマホ調整 */
@media (max-width: 900px) {
  .hero-worker .hero-inner {
    display: block !important;
    grid-template-columns: 1fr !important;
    flex-direction: column;
    padding: 32px 16px !important;
    gap: 24px;
  }
  .hero-worker .hero-content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0;
    box-sizing: border-box;
  }
  .hero-worker .hero-title {
    font-size: 26px !important;
    line-height: 1.4;
    word-break: keep-all;
  }
  .hero-worker .hero-subtitle {
    font-size: 13px;
    line-height: 1.8;
  }
  .hero-worker .hero-trust-badges {
    flex-wrap: wrap;
    gap: 8px;
  }
  .hero-worker .hero-trust-pill {
    font-size: 11px;
    padding: 6px 12px;
  }
  .hero-worker .hero-cta {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  .hero-worker .hero-cta .btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
  .hero-worker .hero-visual {
    width: 100%;
  }
  .hero-slider {
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .hero-worker .hero-title {
    font-size: 22px !important;
  }
  .hero-worker .hero-eyebrow {
    font-size: 11px;
    line-height: 1.5;
    padding: 6px 12px;
  }
}

/* カテゴリカルーセル スマホ */
@media (max-width: 600px) {
  .wx-carousel-card {
    width: 180px;
  }
  .wx-carousel-card-image {
    width: 180px;
    height: 150px;
  }
  .wx-carousel-card-image img {
    width: 180px;
    height: 150px;
  }
}

/* セクションタイトル スマホ */
@media (max-width: 600px) {
  .wx-section-title,
  .wx-categories-title {
    font-size: 20px !important;
    line-height: 1.5;
  }
  .wx-section-subtitle,
  .wx-categories-subtitle {
    font-size: 12px;
  }
  .wx-worklife-section,
  .wx-features-section,
  .wx-safety-section,
  .wx-categories-section {
    padding: 48px 0;
  }
}

/* =====================================================
   発注者TOP（index.php）背景グラデーション
   コーポレートサイトのHERO風（より淡く・控えめ）
===================================================== */
.client-bg-gradient {
  position: relative;
  overflow-x: hidden;
  background: linear-gradient(
    135deg,
    #f7faff 0%,
    #eef4fc 25%,
    #f0f6ff 50%,
    #f5f9ff 75%,
    #fafcff 100%
  );
  background-size: 300% 300%;
  animation: clientBgFlow 30s ease-in-out infinite;
}
@keyframes clientBgFlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 各セクションを透過させ、グラデーションが透ける */
.client-bg-gradient .section {
  background-color: transparent !important;
}
.client-bg-gradient .section-bg {
  background-color: rgba(255, 255, 255, 0.6) !important;
  backdrop-filter: blur(2px);
}

/* ===== AIマッチングカルーセル (worker.php) ===== */


.ai-match-card {
  flex: 0 0 260px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 18px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.15s, transform 0.15s;
}
.ai-match-card:hover { box-shadow: 0 4px 16px rgba(0,86,184,0.12); transform: translateY(-2px); }
.ai-match-card-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.ai-match-card-title { font-size: 13px; font-weight: 700; color: var(--color-text-main); line-height: 1.5; margin: 0; flex: 1; }
.ai-match-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.ai-match-tag { font-size: 10px; padding: 2px 7px; background: #e0ecff; color: #0056b8; border-radius: 999px; }
.ai-match-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.ai-match-budget { font-size: 12px; color: var(--color-text-sub); }
.ai-match-score { font-size: 11px; font-weight: 700; color: #0056b8; background: #e0ecff; padding: 2px 8px; border-radius: 999px; }


/* worker.php auto-generated */
.wkr-s1 { text-align:center; padding:40px; color:#6b7280; }
.wkr-s2 { text-align:center; margin-top: 24px; }
