
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@900&family=M+PLUS+1p:wght@900&display=swap');

/* 大きなかっこを非表示にするためのリセット */
.apt-container *::before,
.apt-container *::after {
  content: none !important;
  display: none !important;
}

/* fieldsetのデフォルトスタイルをリセット（marginとpaddingは除外） */
.apt-container fieldset {
  border: none !important;
  min-width: 0 !important;
  background: transparent !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}

/* 適性診断 共通 */
.apt-container { 
  max-width: 880px; 
  margin: 0 auto; 
  padding: 0 16px 32px; 
  position: relative;
  background: linear-gradient(to bottom, #00bfff 0%, #00bfff 450px, #ffffff 950px);
}

/* ファーストビュー */
.apt-firstview { 
  margin: 0 -16px 0; 
  position: relative;
}
.apt-firstview-image { 
  width: 100%; 
  height: auto; 
  display: block !important;
  max-width: 100%;
}

.apt-firstview-anchor {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  animation: float-updown-anchor 2s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes float-updown-anchor {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-40px);
  }
}

.apt-firstview-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  animation: float-updown 2s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes float-updown {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.apt-header { margin: 2px 0; }
.apt-title { font-size: 1rem; margin: 0 0 4px; text-align: center; }
.apt-lead { color: #fff; margin: 0; text-align: left; }

.apt-body { display: block; }
.apt-card::before, .apt-card::after { display: none; }

.apt-main { position: relative; }
.apt-main::before, .apt-main::after { display: none; }

/* ページタイトル非表示 */
.page-aptitude-test .entry-title,
.page-aptitude-test h1.page-title,
.page-aptitude-test .apt-title,
body.page-template-page-test h1:first-of-type {
  display: none !important;
}

/* 設問 */
.apt-form { position: relative; }
.apt-form::before, .apt-form::after { display: none; }

/* スタート画面 */
.apt-start-screen {
  text-align: center;
}

.apt-start-image-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 10px;
  width: 100%;
  max-width: 800px;
  margin: 5px auto 10px;
}

/* PC版は表示、スマホ版は非表示 */
.apt-start-image-pc {
  display: flex;
}
.apt-start-image-sp {
  display: none;
}

@media (max-width: 640px) {
  /* スマホ版はjob4のみ表示 */
  .apt-start-image-pc {
    display: none;
  }
  .apt-start-image-sp {
    display: block;
  }
  .apt-start-image-sp .apt-start-image {
    width: 100%;
    max-width: 400px;
  }
}

.apt-start-image,
.apt-start-image-overlay {
  position: static;
  width: 30%;
  height: auto;
  display: block !important;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.apt-start-image:hover,
.apt-start-image-overlay:hover {
  transform: translateY(-10px);
}

.apt-start-text {
  font-size: 1.5rem;
  color: #797979;
  margin-bottom: 30px;
}

button.apt-start-button,
.apt-button.apt-start-button {
  position: relative;
  overflow: hidden;
  font-size: 2rem !important;
  padding: 30px 100px !important;
  background: linear-gradient(135deg, #ff8400 0%, #ff8400 100%) !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4) !important;
  border-radius: 12px !important;
  border: none;
  cursor: pointer;
}

.apt-button-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shine 2s ease-in-out infinite;
}

.apt-button-text {
  position: relative;
  z-index: 1;
}

@keyframes shine {
  0% {
    left: -100%;
  }
  50%, 100% {
    left: 100%;
  }
}

button.apt-start-button:hover,
.apt-button.apt-start-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.5) !important;
  background: linear-gradient(135deg, #ff8400 0%, #ff8400 100%) !important;
}


/* 戻るボタン */
.apt-back-container {
  text-align: center;
  margin: 15px 0;
}

.apt-back-button {
  background: transparent;
  border: 2px solid #64748b;
  color: #64748b;
  padding: 10px 24px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.apt-back-button:hover {
  background: #64748b;
  color: #fff;
}

/* 進捗バー */
.apt-progress-container {
  position: relative;
  width: 80%;
  max-width: 800px;
  margin: 40px auto 20px;
}

.apt-progress-bar-wrap {
  position: relative;
  height: 50px;
  background-color: #f0f0f0;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.apt-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, #2563eb 0%, #1e40af 100%);
  border-radius: 25px;
  transition: width 0.4s ease;
  width: 10%;
}

.apt-progress-text {
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: #fff;
  margin-bottom: 10px;
}

/* 設問のスタイル - 各設問の間に大きな隙間を設定 */
.apt-question {
  border: none;
  padding: 0px 20px !important;
  margin: 40px 0 80px 0 !important;
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

/* 最後の設問の下の余白を少なくする */
.apt-question:last-child {
  margin-bottom: 30px !important;
}

/* 設問と設問の間に線を追加 */
.apt-question:not(:last-child) {
  border-bottom: 3px solid #2563eb !important;
  padding-bottom: 60px !important;
}
.apt-question::before, .apt-question::after { display: none; }
.apt-question:last-child { border-bottom: none; }

/* 質問コンテンツエリア（画像と質問文を重ねる） */
.apt-question-content {
  position: relative;
  width: 80%;
  max-width: 800px;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
}
 
/* 質問文を画像の上に配置 */
.apt-question-label {
  font-weight: 700;
  font-size: 2.6rem;
  text-align: center;
  padding: 60px 20px 20px;
  background: none;
  color: #1e3a8a;
  text-shadow: 
    3px 3px 6px rgba(255, 255, 255, 0.9),
    -3px -3px 6px rgba(255, 255, 255, 0.9),
    3px -3px 6px rgba(255, 255, 255, 0.9),
    -3px 3px 6px rgba(255, 255, 255, 0.9),
    0 0 12px rgba(255, 255, 255, 0.8),
    0 0 24px rgba(255, 255, 255, 0.6);
  z-index: 2;
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  line-height: 1.6;
}

/* 画像を背景として配置し、透明度を調整 */
.apt-question-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  opacity: 1;
  position: absolute;
  top: 0;
  left: 0;
  object-fit: cover;
  z-index: 1;
}

/* 選択肢を画像の中に配置 */
.apt-scale {
  display: flex;
  gap: 30px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  z-index: 3;
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
}

.apt-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 40px;
  border: 3px solid #2563eb;
  border-radius: 12px;
  cursor: pointer;
  background: #2563eb;
  color: #ffffff;
  font-weight: 700;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  min-width: 150px;
}

/* ホバー時のアニメーション効果 */
.apt-option::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.apt-option:hover::before {
  width: 300px;
  height: 300px;
}

.apt-option:hover {
  background: #60a5fa;
  color: #ffffff;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
  border-color: #60a5fa;
}

.apt-option:active {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.2);
  background: #3b82f6;
}

/* ラジオボタンを完全に非表示 */
.apt-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.apt-option-label {
  font-size: 1.2rem;
  position: relative;
  z-index: 1;
  color: #ffffff;
  transition: all 0.3s ease;
}

.apt-option:hover .apt-option-label {
  color: #ffffff;
  transform: scale(1.1);
}

.apt-scale-legend { display: flex; justify-content: space-between; color: #777; font-size: 0.86rem; margin-top: 6px; }

.apt-actions { margin-top: 16px; text-align: center; }
.apt-button { display: inline-block; background: #2563eb; color: #fff; text-decoration: none; padding: 14px 28px; border-radius: 8px; transition: background .2s ease; font-size: 1rem; font-weight: 600; }
.apt-button:hover { background: #1e40af; }

/* 結果 */
.apt-result {
  padding: 40px 20px;
  text-align: center;
}

.apt-result-title {
  font-size: 2.8rem;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  margin: 0 0 30px 0;
  letter-spacing: 0.05em;
}

.apt-result .apt-score { font-weight: 500; }

.apt-result .apt-type { 
  font-size: 1.3rem; 
  margin: 20px 0; 
  text-align: center;
  color: #475569;
  line-height: 1.8;
}

.apt-result .apt-job-name { 
  display: block;
  font-family: 'M PLUS 1p', 'Noto Sans JP', sans-serif;
  font-size: 5rem;
  color: #1e3a8a;
  margin-top: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-shadow: 2px 2px 4px rgba(30, 58, 138, 0.2);
  position: relative;
  background: linear-gradient(
    90deg,
    #1e3a8a 0%,
    #1e3a8a 40%,
    #60a5fa 50%,
    #1e3a8a 60%,
    #1e3a8a 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine-text 3s ease-in-out infinite;
}

@keyframes shine-text {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.apt-result .apt-desc { color: #64748b; }

/* 結果画像 */
.apt-result-image-wrap {
  text-align: center;
  margin: 30px 0;
}

.apt-result-image {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.apt-result-image:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.25);
}

.apt-result-job-image-wrap {
  margin: 50px 0 30px;
  padding: 30px;
  background: transparent;
  text-align: center;
}

.apt-job-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0369a1;
  margin: 0 0 20px;
}

.apt-result-job-image {
  display: block;
  max-width: 480px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.apt-result-job-image:hover {
  transform: scale(1.02);
}

/* 結果の解説文章 */
.apt-result-explanation {
  margin: 30px 0;
  padding: 28px;
  background: linear-gradient(135deg, #fefefe 0%, #f8fafc 100%);
  border-radius: 16px;
  border-left: 5px solid #2563eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.apt-explanation-catch {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1e3a8a;
  margin: 0 0 20px 0;
  text-align: center;
  line-height: 1.6;
}

.apt-explanation-text {
  font-size: 1.05rem;
  line-height: 2;
  color: #475569;
  margin: 0;
  text-align: left;
}

.apt-note {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 30px 0 20px;
  text-align: left;
  line-height: 1.7;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
}

/* レスポンシブ */
@media (max-width: 640px) {
  .apt-container { padding: 0 12px 24px; }
  .apt-firstview { margin: 0 -12px 0; }
  .apt-title { font-size: 1.5rem; }
  
  /* ファーストビュー画像のスマホ用 */
  .apt-firstview-image {
    display: block !important;
    width: 100%;
    max-width: 100%;
  }
  
  /* スマホ用anchorアニメーション */
  .apt-firstview-anchor {
    animation: float-updown-anchor-sp 2s ease-in-out infinite;
  }
  
  @keyframes float-updown-anchor-sp {
    0%, 100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-20px);
    }
  }
  
  /* スタート画面のスマホ用サイズ */
  .apt-start-image {
    display: block !important;
    width: 400px;
    max-width: 90%;
    margin: 5px auto 10px;
  }
  
  button.apt-start-button,
  .apt-button.apt-start-button {
    font-size: 1.2rem !important;
    padding: 16px 40px !important;
  }
  
  .apt-start-heading {
    font-size: 1.2rem;
  }
  
  .apt-question {
    padding: 30px 10px !important;
    gap: 30px;
  }
  
  .apt-question-content {
    width: 95%;
    min-height: 500px;
  }
  
  .apt-question-label {
    font-size: 1.6rem;
    padding: 40px 15px 15px;
    top: 10px;
    text-shadow: 
      2px 2px 4px rgba(255, 255, 255, 0.9),
      -2px -2px 4px rgba(255, 255, 255, 0.9),
      2px -2px 4px rgba(255, 255, 255, 0.9),
      -2px 2px 4px rgba(255, 255, 255, 0.9),
      0 0 8px rgba(255, 255, 255, 0.8),
      0 0 16px rgba(255, 255, 255, 0.6);
  }
  
  .apt-question-image {
    width: 100%;
    height: 100%;
  }
  
  .apt-scale {
    gap: 20px;
    bottom: 40px;
  }
  
  .apt-option {
    padding: 14px 30px;
    min-width: 120px;
  }
  
  .apt-option-label {
    font-size: 1.1rem;
  } 
  
  .apt-progress-text {
    font-size: 1rem;
  }
  
  .apt-progress-container {
    height: 40px;
  }
}

@media (min-width: 1024px) {
  /* PCサイズ用のスタイル（必要に応じて） */
}

/* 広告セクション見出し */
.apt-ad-heading {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1e3a8a;
  margin: 150px 0 20px;
}

/* 2列×2行 広告グリッド */
.apt-ad-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  width: 100%;
}

.apt-ad-item {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.apt-ad-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
}

.apt-ad-link {
  display: block;
  text-decoration: none;
}

.apt-ad-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.apt-ad-text {
  padding: 12px;
}

.apt-ad-title {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e40af;
  margin-bottom: 4px;
}

.apt-ad-desc {
  display: block;
  font-size: 1rem;
  color: #64748b;
}

/* レスポンシブ - 広告グリッド */
@media (max-width: 640px) {
  .apt-ad-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .apt-ad-image {
    height: 200px;
  }
  
  .apt-ad-text {
    padding: 12px;
  }
  
  .apt-ad-title {
    font-size: 1rem;
  }
  
  .apt-ad-desc {
    font-size: 0.85rem;
  }
}

