/* CSS Variables */
:root {
  --primary-color: #1B2A4A; /* Navy */
  --secondary-color: #3B82F6; /* Blue */
  --bg-light: #F8FAFC; /* Light Gray */
  --white: #FFFFFF;
  --text-main: #333333;
  --text-muted: #666666;
  --font-en: 'Inter', sans-serif;
  --font-jp: 'Noto Sans JP', sans-serif;
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-jp);
  color: var(--text-main);
  background-color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-en);
  font-weight: 700;
}

h1, h2, h3, h4, h5, h6,
.japanese-title {
  font-family: var(--font-jp);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

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

/* Utility Classes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 100px 0;
}

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

.text-center {
  text-align: center;
}

.section-title {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 10px;
  text-align: center;
  font-family: var(--font-en);
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 60px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 15px 30px;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: var(--white);
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
  background-color: #2563EB;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

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

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  padding: 15px 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  font-family: var(--font-en);
}

.logo span {
  color: var(--secondary-color);
}

.nav-menu {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-link {
  font-weight: 500;
  color: var(--text-main);
  position: relative;
  padding: 8px 16px;
  border-radius: var(--border-radius);
}

.nav-link.active {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--secondary-color);
  font-weight: 700;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: var(--transition);
}

.nav-link:hover::after {
  width: 80%;
}

.nav-link.active::after {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
}

.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary-color);
}

/* Hero Section */
.hero {
  padding: 180px 0 100px;
  background: linear-gradient(rgba(27, 42, 74, 0.7), rgba(27, 42, 74, 0.7)), url('../images/hero_buildings.png') center/cover no-repeat;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

#particles-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-inner {
  display: block;
  max-width: 900px;
  position: relative;
  z-index: 3;
}

.hero-content {
  /* removed flex: 1 */
}

.hero-title {
  font-size: 4rem;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero-text {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 40px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.hero-buttons .btn-outline {
  color: var(--white);
  border-color: var(--white);
}

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

.hero-image {
  display: none;
}

/* Services Overview (Card Grid) */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 40px 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.05);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.1);
  border-color: var(--secondary-color);
}

.service-icon {
  font-size: 3rem;
  color: var(--secondary-color);
  margin-bottom: 20px;
}

.service-title {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.service-desc {
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Numbers Section */
.numbers-section {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 80px 0;
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.number-item h3 {
  font-size: 3.5rem;
  color: var(--secondary-color);
  margin-bottom: 10px;
  font-family: var(--font-en);
}

.number-item p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Testimonials */
.testimonial-card {
  background: var(--white);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.testimonial-text {
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: 20px;
  color: var(--text-main);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 15px;
}

.author-avatar-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #E2E8F0;
  color: #718096;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.author-info h4 {
  font-size: 1rem;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.author-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* News */
.news-list {
  max-width: 800px;
  margin: 0 auto;
}

.news-item {
  display: flex;
  padding: 20px 0;
  border-bottom: 1px solid #E2E8F0;
  transition: var(--transition);
}

.news-item:hover {
  padding-left: 10px;
}

.news-date {
  font-family: var(--font-en);
  color: var(--text-muted);
  width: 120px;
  flex-shrink: 0;
}

.news-title {
  color: var(--primary-color);
  font-weight: 500;
}

/* CTA Section */
.cta-section {
  background-color: var(--white);
  text-align: center;
  padding: 80px 40px;
  border-radius: var(--border-radius);
  margin: 50px 20px;
  border: 3px solid var(--secondary-color);
  box-shadow: 0 15px 40px rgba(59, 130, 246, 0.15);
}

.cta-title {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.cta-text {
  margin-bottom: 40px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.cta-buttons .btn {
  width: 280px;
  max-width: 100%;
  margin: 0 !important;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 60px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 15px;
  display: inline-block;
}

.footer-info {
  color: rgba(255,255,255,0.7);
  margin-bottom: 20px;
}

.footer-links h4 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--white);
}

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
}

.footer-links a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
}

/* Pages Subheader */
.page-header {
  padding: 120px 0 40px;
  background-color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-title {
  font-size: 3.5rem;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 800;
  letter-spacing: -1px;
  animation: slideInTitle 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.page-header p {
  animation: slideInSub 2s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
  opacity: 0;
}

/* タイトルの下に青いアクセントラインを表示する演出 */
.page-header .container::after {
  content: '';
  display: block;
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--secondary-color), #60A5FA);
  margin: 25px auto 0;
  border-radius: 2px;
  animation: expandLine 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

/* シャープなスライドインアニメーション（タイトル用：左から右へ） */
@keyframes slideInTitle {
  from {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}

/* シャープなスライドインアニメーション（サブテキスト用：左から右へ） */
@keyframes slideInSub {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* アクセントラインが中央から広がるアニメーション */
@keyframes expandLine {
  from {
    width: 0;
  }
  to {
    width: 80px;
  }
}

/* Services Page specific */
.product-section {
  display: flex;
  align-items: center;
  gap: 50px;
  margin-bottom: 100px;
}

.product-section:nth-child(even) {
  flex-direction: row-reverse;
}

.product-content {
  flex: 1;
}

.product-image {
  flex: 1;
}

.product-image img {
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.feature-list {
  margin: 20px 0;
}

.feature-list li {
  margin-bottom: 10px;
  padding-left: 25px;
  position: relative;
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--secondary-color);
  font-weight: bold;
}

.price-box {
  background: var(--bg-light);
  padding: 20px;
  border-radius: var(--border-radius);
  margin-top: 20px;
  font-weight: bold;
  color: var(--primary-color);
}

/* Process Steps */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 50px;
}

.process-step {
  text-align: center;
  position: relative;
}

.process-number {
  width: 60px;
  height: 60px;
  background-color: var(--secondary-color);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 auto 20px;
}

/* FAQ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 20px;
  border: 1px solid #E2E8F0;
  border-radius: var(--border-radius);
  padding: 20px;
}

.faq-q {
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 10px;
  display: flex;
  gap: 10px;
}

.faq-q::before {
  content: 'Q.';
  color: var(--secondary-color);
}

.faq-a {
  color: var(--text-muted);
  display: flex;
  gap: 10px;
}

.faq-a::before {
  content: 'A.';
  color: var(--primary-color);
  font-weight: bold;
}

/* Company Page specific */
.message-section {
  background: linear-gradient(135deg, #f0f4ff 0%, #e8eef8 100%);
  padding: 120px 0;
  position: relative;
}

.message-section .section-title {
  color: var(--primary-color);
}

.message-section .section-subtitle {
  color: var(--text-muted);
}

.message-box {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 代表者アイコン＋名前（カードの上に配置） */
.message-author {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
  z-index: 2;
}

.message-author-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 15px;
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.message-author-title {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 3px;
}

.message-author-name {
  color: var(--primary-color);
  font-size: 1.4rem;
  font-weight: 700;
}

/* メッセージ本文カード */
.message-text {
  background: var(--white);
  padding: 50px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
  position: relative;
  width: 100%;
  border-top: 4px solid var(--secondary-color);
}

/* カード内の引用符 */
.message-text::before {
  content: '"';
  position: absolute;
  top: 30px;
  left: 40px;
  font-size: 4rem;
  color: rgba(59, 130, 246, 0.15);
  font-family: Georgia, serif;
  line-height: 1;
}

.message-text p {
  color: var(--text-main);
  font-size: 1.05rem;
  line-height: 2;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.company-table {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  border-collapse: collapse;
}

.company-table th, .company-table td {
  padding: 20px;
  border-bottom: 1px solid #E2E8F0;
}

.company-table th {
  width: 25%;
  text-align: left;
  background-color: var(--bg-light);
  color: var(--primary-color);
}

.history-list {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.history-item {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
}

.history-year {
  font-weight: bold;
  color: var(--secondary-color);
  width: 100px;
  flex-shrink: 0;
}

.map-container iframe {
  width: 100%;
  height: 400px;
  border: none;
  border-radius: var(--border-radius);
}

/* Recruit Page specific */
.job-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.job-card {
  background: var(--white);
  border: 1px solid #E2E8F0;
  border-radius: var(--border-radius);
  padding: 30px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.job-card .btn {
  margin-top: auto;
}

.job-title {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--bg-light);
}

.job-details {
  display: block; /* 内容を常に表示する */
  margin-top: 20px;
  animation: fadeInDown 0.3s ease forwards;
}

.job-details.show {
  display: block;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn-toggle-details {
  display: none; /* 内容を常時表示するため非表示にする */
  width: 100%;
  padding: 15px;
  background-color: var(--bg-light);
  color: var(--primary-color);
  border: 1px solid #E2E8F0;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  font-family: var(--font-jp);
  transition: var(--transition);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.btn-toggle-details:hover {
  background-color: #E2E8F0;
}

.btn-toggle-details.active i {
  transform: rotate(180deg);
}

.job-details dl {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 15px;
  font-size: 0.85rem; /* 文字を少し小さめにする */
}

.job-details dt {
  width: 20%;
  font-weight: bold;
  color: var(--primary-color);
  padding: 10px 0;
}

.job-details dd {
  width: 80%;
  padding: 10px 0;
  color: var(--text-muted);
}

/* Interview Grid */
.interview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.interview-card img {
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10; /* 高さを抑える */
  object-fit: cover;
  object-position: 50% 40%; /* 上1/6、下1/4程度が切り取られるように位置を微調整 */
}

/* Contact Page specific */
.contact-form {
  max-width: 700px;
  margin: 0 auto;
  background: var(--white);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.form-group {
  margin-bottom: 25px;
}

.form-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
  color: var(--primary-color);
}

.form-label span {
  color: #E53E3E;
  font-size: 0.8rem;
  margin-left: 10px;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #CBD5E0;
  border-radius: 4px;
  font-family: var(--font-jp);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

textarea.form-control {
  height: 150px;
  resize: vertical;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
  }
  .hero-buttons {
    justify-content: center;
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .number-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-section, .product-section:nth-child(even) {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--white);
    flex-direction: column;
    justify-content: center;
    transition: var(--transition);
  }
  .nav-menu.active {
    left: 0;
  }
  .header-actions {
    display: none;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .number-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .process-grid {
    grid-template-columns: 1fr;
  }
  .company-table th, .company-table td {
    display: block;
    width: 100%;
  }
  .job-list {
    grid-template-columns: 1fr;
  }
  .job-details dt, .job-details dd {
    width: 100%;
  }
  .message-box {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
  .message-author {
    width: 100%;
  }
  .message-text {
    padding: 70px 25px 30px;
  }
  .interview-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 2.5rem;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 40px;
  border: 1px solid #888;
  width: 90%;
  max-width: 500px;
  border-radius: var(--border-radius);
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.close-modal {
  color: #aaa;
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

.close-modal:hover,
.close-modal:focus {
  color: var(--primary-color);
  text-decoration: none;
  cursor: pointer;
}
