@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Noto+Sans+JP:wght@400;600;700&display=swap');

/* === Theme Colors === */
:root {
  --bg-dark: #0b132b;
  --bg-section: #0f172a;
  --text: #e0e6ed;
  --gold1: #facc15;
  --gold2: #fde68a;
}

/* === Reset === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", "Noto Sans JP", sans-serif;
  background-color: var(--bg-dark);
  color: var(--text);
  line-height: 1.7;
}

/* === Header === */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(11, 19, 43, 0.9);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
}

header a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  margin: 0 1rem;
  transition: color 0.3s ease;
}

header a:hover {
  color: var(--gold1);
}

/* === Hero Section (Fixed Background) === */
.hero {
  position: relative;
  height: 100vh; /* 全画面サイズで表示 */
  background: url('images/hero-bg.jpg') center center / cover no-repeat fixed;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  padding: 2rem;
  z-index: 1;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 20, 0.55); /* ほんのり暗くして文字の可読性UP */
  z-index: 0;
}

.hero h1, .hero p {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  color: #ffd84d; /* 鮮やかな黄色 */
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
  margin-bottom: 1rem;
}

.hero p {
  max-width: 800px;
  font-size: 1.2rem;
  color: #dbe3f0;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}


/* --- optional: 背景が明るすぎる時のみ軽い補正 --- */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.1);
  z-index: 0;
}
.hero h1, .hero h2, .hero p {
  position: relative;
  z-index: 1;
}

/* === Card Grid === */
.card-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  position: relative;
  width: 360px;
  height: 240px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.8);
  transition: all 0.6s ease;
  z-index: 0;
}

.card:hover img {
  filter: brightness(1.1);
  transform: scale(1.05);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

/* === Overlay === */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  padding: 1.5rem;
  z-index: 2;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
  transition: transform 0.4s ease;
}

.overlay h2 {
  font-size: 1.4rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
  margin-bottom: 0.6em;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: anywhere;
  white-space: normal;
}

.overlay p {
 font-size: 1rem;
  line-height: 1.8;
  letter-spacing: 0.02em;
  text-align: justify;  /* 左右均等配置で見た目を整える */
  text-justify: inter-character;
  word-break: keep-all;
  overflow-wrap: anywhere;
  margin-bottom: 1.2em;
}


/* === 多言語対応ボタン修正 === */
.btn {
  display: inline-block;
  padding: 0.9rem 2.2rem;       /* 横に余裕を持たせる */
  font-size: 1rem;
  border-radius: 30px;
  background: linear-gradient(90deg, #FFD84D, #FFE66E);
  color: #000;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;          /* 改行させない */
  overflow: visible;            /* 切れ防止 */
  min-width: 240px;             /* 英語表記に対応した最低幅 */
  box-sizing: border-box;
}

.card .btn {
  margin-top: 1.5rem;
  align-self: center;
}

/* 小さい画面（スマホ）での調整 */
@media (max-width: 600px) {
  .btn {
    font-size: 0.9rem;
    padding: 0.8rem 1.8rem;
    min-width: 200px;
  }
}


.btn:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 25px rgba(250, 204, 21, 0.5);
  filter: brightness(1.1);
}

/* === Works / About / Contact Sections === */
section {
  padding: 4rem 2rem;
  text-align: center;
  background-color: var(--bg-section);
}

.works, .about, .contact {
  background: var(--bg-dark);
  padding: 4rem 1.5rem;
}

.works h2, .about h2, .contact h2 {
  color: var(--gold1);
  font-size: 2rem;
  margin-bottom: 1.5rem;
  animation: fadeInUp 1.2s ease;
}

.works-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.works-item {
  width: 280px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s ease;
}

.works-item:hover {
  transform: translateY(-4px);
}

/* === About Section === */
.about-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}

.about-text {
  flex: 1 1 400px;
  text-align: left;
}

.about-img {
  flex: 1 1 300px;
}

.about-img img {
  width: 100%;
  border-radius: 10px;
}

/* === Contact Section === */
.contact form {
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
}

.contact label {
  display: block;
  margin-top: 1rem;
  font-weight: 600;
}

.contact input,
.contact textarea {
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.3rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #334155;
  color: #fff;
}

.contact button {
  margin-top: 1.2rem;
  background: linear-gradient(135deg, var(--gold1), var(--gold2));
  color: #000;
  font-weight: 700;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 40px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact button {
  display: block;
  margin: 1.5rem auto 0 auto; /* 上に少し余白をつけて中央寄せ */
}


.contact button:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 25px rgba(250, 204, 21, 0.4);
}

/* === Reveal Animation === */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* === Keyframes === */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Fix: Make form inputs visible ===== */
.contact input,
.contact textarea,
.contact select {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
}

.contact input::placeholder,
.contact textarea::placeholder {
  color: #e0e0e0;
  opacity: 0.9;
}


/* === Footer === */
footer {
  text-align: center;
  padding: 2rem;
  background: var(--bg-dark);
  color: #94a3b8;
  font-size: 0.9rem;
}

select option { 
  color: #000; 
  background: #fff; 
}
select {
  color: #000;
  background: #f9fafb;
}

/* === what we do === */
#whatwedo {
  padding: 4rem 2rem;
  text-align: center;
  background: #020617;
  color: #fff;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.service-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}
.service-card h3 {
  margin-bottom: 0.8rem;
  color: #f1f5f9;
}
.service-card p {
  color: #cbd5e1;
  font-size: 0.95rem;
}
.work-card p {
line-height: 1.8;
  letter-spacing: 0.02em;
  word-break: keep-all;         /* 日本語中の不自然な改行を防止 */
  overflow-wrap: break-word;    /* 長い単語を安全に折り返す */
  white-space: normal;          /* 強制1行防止 */
  text-align: justify;          /* 均等配置で見た目を整える */
  text-justify: inter-character;
  font-weight: 400;
  color: #e2e8f0;
  margin: 0 auto 1.2em;
  max-width: 90%;
}

.work-card h3 {
  text-align: center;
  margin-bottom: 0.5em;
  line-height: 1.4;
  word-break: keep-all;
}

/* ===== Worksセクション用 ===== */
.works-item h3,
.works-item p {
  line-height: 1.7;
  letter-spacing: 0.02em;
  word-break: keep-all;        /* 日本語の途中改行を防ぐ */
  overflow-wrap: break-word;   /* 長い語句は安全に折返す */
  white-space: normal;
  text-align: left;            /* 均等割付を解除し自然な左揃えへ */
  text-justify: auto;          /* 強制的な文字間調整を無効化 */
}

/* p の余白と色味を調整 */
.works-item p {
  line-height: 1.8;
  letter-spacing: 0.02em;
  word-break: normal;               /* keep-allだと句読点前で切れる場合があるのでnormalに */
  overflow-wrap: anywhere;
  white-space: normal;
  text-align: left;
  text-justify: auto;
  hanging-punctuation: none;        /* 禁則処理を有効化 */
  line-break: strict;               /* 日本語の禁則処理を厳密に */
  -webkit-line-break: strict;       /* Safari/Chrome向け */
  -moz-line-break: strict;
  -ms-line-break: strict;
}


/* カード全体の高さをそろえる */
.works-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px; /* 必要に応じて調整 */
}

/* === Overlay readability improvement === */
.card img {
  filter: brightness(65%); /* 背景を暗くして文字を際立たせる */
}

.overlay {
  background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.65));
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

.overlay h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 3px 8px rgba(0,0,0,0.7);
  margin-bottom: 0.6em;
  background: rgba(0, 0, 0, 0.45); /* タイトル背景を半透明化して読みやすく */
  padding: 6px 14px;
  border-radius: 6px;
  display: inline-block;
}

.overlay p {
  font-size: 1rem;
  color: #e2e8f0;
  line-height: 1.8;
  letter-spacing: 0.02em;
  text-align: center;
  word-break: normal;
  overflow-wrap: anywhere;
  margin-top: 0.8em;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

/* === Hover animation refinement === */
.card:hover img {
  filter: brightness(85%);
  transform: scale(1.04);
}

.card:hover .overlay h2 {
  background: rgba(0, 0, 0, 0.6);
  transform: translateY(-3px);
  transition: all 0.3s ease-in-out;
}

/* === 求職者向けメッセージ・比較表 === */
.message {
  background: #0b132b;
  color: #e4e8ef;
  text-align: center;
  padding: 4rem 2rem;
}

.message h2 {
  color: #FFD84D;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.plan-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.plan {
  background: #1e293b;
  border-radius: 12px;
  padding: 1.5rem;
  width: 320px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.plan h3 {
  color: #FFD84D;
  margin-bottom: 0.8rem;
}

.plan p {
  font-size: 0.95rem;
  color: #e5e7eb;
  line-height: 1.7;
}

.plan-table {
  margin-top: 2.5rem;
  overflow-x: auto;
}

.plan-table table {
  width: 100%;
  border-collapse: collapse;
  background: #0b132b;
  color: #e5e7eb;
  font-size: 0.95rem;
}

.plan-table th, .plan-table td {
  border: 1px solid #1e293b;
  padding: 0.8rem 1rem;
  text-align: center;
}

.plan-table th {
  background: #1e293b;
  color: #FFD84D;
}


/* === モーダル（修正版＋ホバー対応統合） === */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.4s ease;
}

.modal-content {
  background-color: #1e293b;
  padding: 2rem;
  border-radius: 12px;
  width: 80%;
  max-width: 700px;
  color: #e4e8ef;
  box-shadow: 0 0 25px rgba(0,0,0,0.6);
  text-align: center;
  position: relative;
  z-index: 10001;
}

.close {
  position: absolute;
  right: 20px;
  top: 20px;
  color: #FFD84D;
  font-size: 2rem;
  cursor: pointer;
}

/* === アニメーション === */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* === モーダル内テーブル === */
.modal-content table {
  width: 100%;
  margin-top: 1rem;
  border-collapse: collapse;
  background: #1e293b;
  border: 1px solid #475569;
}
.modal-content th, .modal-content td {
  border: 1px solid #475569;
  padding: 0.8rem 1rem;
  text-align: left;
  vertical-align: middle;
  color: #e5e7eb;
  font-size: 0.95rem;
}
.modal-content th {
  background-color: #334155;
  color: #FFD84D;
  font-weight: 700;
}

/* === マージン率リンク === */
.modal-link {
  color: #FFD84D;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.25s ease;
}
.modal-link:hover {
  color: #FFF46E;
  text-shadow: 0 0 8px rgba(255, 232, 90, 0.8);
  text-decoration-color: #FFF46E;
}

/* === 英語版ボタン切れ修正（最終版）=== */
.card {
  position: relative;
  overflow: visible; /* 切れ防止 */
}

.card .overlay {
  padding: 1.5rem;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.card .btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  border-radius: 30px;
  background: linear-gradient(90deg, #FFD84D, #FFE66E);
  color: #000;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: visible;
  min-width: 260px; /* ← 英語ボタン完全対応 */
  box-sizing: border-box;
  margin: 1.5rem auto 0;
}

/* スマホ対応 */
@media (max-width: 600px) {
  .card .btn {
    min-width: 220px;
    font-size: 0.9rem;
    padding: 0.8rem 1.8rem;
  }
}

/* === カード内レイアウト最適化 === */
.card .overlay {
  padding: 1rem 1.2rem 1.2rem 1.2rem; /* 上下の余白を抑える */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  height: 100%;
  box-sizing: border-box;
}

/* タイトル（企業向けリソース支援 / Japan Market Entry Support） */
.card .overlay h2 {
  margin: 0.5rem 0 0.8rem 0; /* 上下のマージンを減らす */
  font-size: 1.3rem;
  line-height: 1.4;
}

/* 本文 */
.card .overlay p {
  margin: 0 0 0.8rem 0; /* 下の余白を短縮 */
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ボタン */
.card .btn {
  margin-top: 0.8rem; /* 間隔を短くしてボタンが上に来るように */
  padding: 0.9rem 2.2rem;
  min-width: 240px;
  white-space: nowrap;
}

.hero {
  position: relative;
  z-index: 5;
}

.hero .btn, 
.hero .btn-primary {
  pointer-events: auto;
  cursor: pointer;
}

.floating-article-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #1b273b;
  color: white;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 0.95rem;
  box-shadow: 0px 8px 20px rgba(0,0,0,0.25);
  display: flex;
  gap: 10px;
  align-items: center;
  z-index: 9999;
  transition: 0.3s ease;
}

.floating-article-banner a {
  background: #ffcc33;
  border-radius: 6px;
  padding: 6px 12px;
  font-weight: bold;
  text-decoration: none;
  color: #1b273b;
}

.floating-article-banner:hover {
  transform: translateY(-4px);
}
