/* Component Styles */

/* Smart Heading */
.smart-heading {
  border-left: 5px solid var(--color-blue);
  padding-left: 30px;
  margin-bottom: 6rem;
}

.smart-heading .en-title {
  display: block;
  font-family: var(--font-serif);
  font-size: 3.6rem;
  color: var(--color-blue);
  line-height: 1.1;
  margin-bottom: 0.5rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.smart-heading .ja-sub {
  display: block;
  font-size: 1.1rem;
  color: var(--color-gray);
  font-weight: 300;
  letter-spacing: 0.1em;
}

/* Ghost Button */
.btn-smart-ghost {
  display: inline-block;
  padding: 16px 48px;
  border: 2px solid var(--color-blue);
  color: var(--color-blue);
  background-color: transparent;
  text-decoration: none;
  font-weight: bold;
  letter-spacing: 0.1em;
  border-radius: 2px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  z-index: 1;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn-smart-ghost::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background-color: var(--color-blue);
  transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: -1;
}

.btn-smart-ghost:hover {
  color: var(--color-white);
}

.btn-smart-ghost:hover::before {
  width: 100%;
}

/* Zigzag Layout */
.zigzag-container {
  display: flex;
  flex-direction: column;
}

.zigzag-block,
.zigzag-layout {
  display: flex;
  align-items: center;
  gap: 80px;
  margin-bottom: 180px;
}

.zigzag-block:last-child {
  margin-bottom: 0;
}

.zigzag-image {
  flex: 1;
  height: auto;
  overflow: hidden;
  flex-shrink: 0;
  aspect-ratio: 16 / 10;
}

.zigzag-image:not(.slideshow) img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.zigzag-block:hover .zigzag-image:not(.slideshow) img {
  transform: scale(1.05);
}

.zigzag-content {
  flex: 1;
}

.zigzag-title {
  font-size: 2rem;
  color: var(--color-blue);
  margin-bottom: 1.5rem;
  line-height: 1.4;
  font-weight: 600;
  white-space: pre-line;
}

.zigzag-text {
  margin-bottom: 2.5rem;
  color: var(--color-text-light);
  line-height: 1.8;
  font-size: 1rem;
  text-align: left;
}

.zigzag-block:nth-child(even) {
  flex-direction: row-reverse;
}

/* Card */
.card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-image {
  width: 100%;
  height: auto;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 32px;
}

.card-tag {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--color-blue);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.card-title {
  font-size: 1.0rem;
  font-weight: bold;
  color: var(--color-text-dark);
  margin-bottom: 16px;
  line-height: 1.4;
}

.card-text {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-divider {
  border: none;
  border-top: 1px solid var(--color-border-light);
  margin: 16px 0;
}

/* Accordion */
.accordion {
  width: 100%;
}

.accordion-item {
  border-bottom: 1px solid var(--color-border-light);
}

.accordion-header {
  width: 100%;
  padding: 24px 0;
  text-align: left;
  font-size: 1.125rem;
  font-weight: bold;
  color: var(--color-text-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color var(--transition-fast);
}

.accordion-header:hover {
  color: var(--color-blue);
}

.accordion-header::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--color-blue);
  transition: transform var(--transition-fast);
}

.accordion-item.active .accordion-header::after {
  transform: rotate(45deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
}

.accordion-item.active .accordion-content {
  max-height: 1000px;
}

.accordion-body {
  padding: 0 0 24px;
  color: var(--color-text-dark);
  line-height: 1.8;
}

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .zigzag-block,
  .zigzag-block:nth-child(even),
  .zigzag-layout,
  .zigzag-layout:nth-child(even) {
    flex-direction: column;
    gap: 40px;
    align-items: stretch;
  }

  /* SP表示: タイトル→画像→説明文の順番に配置 */
  .zigzag-layout.u-flex-row-reverse,
  .zigzag-layout.u-flex-row-reverse:nth-child(even) {
    display: flex !important;
    flex-direction: column !important;
  }

  /* .zigzag-content の子要素を親レベルで配置可能にする */
  .zigzag-layout.u-flex-row-reverse .zigzag-content {
    display: contents;
  }

  /* タイトルを最初に */
  .zigzag-layout.u-flex-row-reverse .benefit-detail-title {
    order: 1;
    margin-top: 48px;
    margin-bottom: 8px;
    text-align: left;
  }

  /* 最初のセクションのタイトルは上マージン不要 */
  .zigzag-layout.u-flex-row-reverse:first-of-type .benefit-detail-title {
    margin-top: 0;
  }

  /* 画像を2番目に */
  .zigzag-layout.u-flex-row-reverse .zigzag-image {
    order: 2;
    margin-bottom: 24px !important;
  }

  /* 説明文を3番目に */
  .zigzag-layout.u-flex-row-reverse .benefit-detail-text {
    order: 3;
    margin-top: 0;
    text-align: left;
  }

  /* リストを4番目に */
  .zigzag-layout.u-flex-row-reverse .benefit-detail-list {
    order: 4;
    margin-top: 0;
    text-align: left;
  }

  /* リストアイテムも左寄せ */
  .zigzag-layout.u-flex-row-reverse .benefit-detail-item {
    text-align: left;
  }

  .zigzag-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    height: auto;
    margin-bottom: 32px;
  }

  .zigzag-block,
  .zigzag-layout {
    margin-bottom: 120px;
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .smart-heading {
    padding-left: 20px;
    margin-bottom: 4rem;
  }

  .smart-heading .en-title {
    font-size: 2.4rem;
  }

  .zigzag-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    height: auto;
  }

  .zigzag-title {
    font-size: 1.5rem;
    white-space: normal !important;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
  }

  .zigzag-text {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    text-align: left;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 24px;
  }

}

/* ========================================================================
   Social Media Embed Component
   ======================================================================== */

.social-embed {
  background-color: var(--color-bg-gray);
  padding: 32px;
  border-radius: var(--radius);
  text-align: center;
}

.social-embed h3 {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--color-text-dark);
  margin-bottom: 16px;
}

.social-embed p {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-bottom: 24px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background-color: var(--color-white);
  border: 2px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  color: var(--color-text-dark);
  font-weight: bold;
  transition: border-color var(--transition-fast);
}

.social-link:hover {
  border-color: var(--color-blue);
  color: var(--color-blue);
}

/* ========================================================================
   CEO Message Component (Index Page)
   ======================================================================== */

.ceo-portrait {
  width: 200px;
  height: 250px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 4px solid var(--color-white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: rotate(-2deg);
}

.ceo-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ceo-message {
  max-width: 800px;
  margin: 0 auto;
}

.ceo-message__title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--color-blue);
  margin-bottom: 24px;
  text-align: center;
}

.ceo-message__text {
  font-size: 1rem;
  line-height: 1.9;
  margin-bottom: 24px;
  text-align: center;
}

.ceo-message__signature {
  text-align: right;
}

.ceo-message__signature-role {
  font-size: 0.875rem;
  color: var(--color-gray);
  margin-bottom: 8px;
}

.ceo-message__signature-name {
  font-family: cursive;
  font-size: 2rem;
  transform: rotate(-2deg);
  display: inline-block;
}

/* SP表示: CEOメッセージのレスポンシブ対応 */
@media (max-width: 768px) {
  .ceo-message {
    max-width: 100%;  /* SPでは幅制限を解除 */
  }

  .ceo-message__title {
    font-size: 1.25rem;
    text-align: left;  /* 左寄せに */
  }

  .ceo-message__text {
    font-size: 0.95rem;
    line-height: 1.8;
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
}

/* ========================================================================
   Utility Classes (Replacing Inline Styles)
   ======================================================================== */

/* リストレイアウト */
.member-list {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

@media (max-width: 768px) {
  .member-list {
    gap: 32px;
  }
}

/* コンテンツラッパー */
.content-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.content-wrapper--narrow {
  max-width: 800px;
  margin: 0 auto;
}

/* セクションタイトル（ジョブ詳細） */
.section-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--color-blue);
  margin-bottom: 32px;
}

/* リンクスタイル */
.link-back {
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.link-back a {
  color: var(--color-blue);
}

/* ボタン拡張 */
.btn-large {
  padding: 20px 60px;
  font-size: 1.1rem;
}

/* テキストコンテンツ */
.text-content {
  line-height: 1.8;
  color: var(--color-text-dark);
}

/* デバッグボックス */
.debug-box {
  background: #ffeb3b;
  padding: 15px;
  margin-bottom: 20px;
  border: 2px solid #f44336;
}

/* Safety Education Section Styles */
.safety-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f4f8;
  border-radius: 8px;
  overflow: hidden;
}

.safety-image-placeholder svg {
  width: 100%;
  height: 100%;
  min-height: 300px;
}

.safety-list {
  margin-top: 32px;
  padding: 24px;
  background-color: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid var(--color-blue);
}

.safety-list__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-blue);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.safety-list__items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.safety-list__items li {
  position: relative;
  padding-left: 24px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-dark);
}

.safety-list__items li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-blue);
  font-weight: bold;
  font-size: 1.1rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .safety-list {
    margin-top: 24px;
    padding: 20px;
  }

  .safety-list__title {
    font-size: 0.95rem;
    margin-bottom: 12px;
  }

  .safety-list__items {
    gap: 10px;
  }

  .safety-list__items li {
    font-size: 0.9rem;
    padding-left: 20px;
  }

  .safety-image-placeholder svg {
    min-height: 200px;
  }
}

/* ==========================================
   TikTok Grid Component
   ========================================== */

.tiktok-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.tiktok-grid .tiktok-embed {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.tiktok-grid .tiktok-embed blockquote {
  margin: 0;
  width: 100%;
  max-width: 100%;
}

/* レスポンシブ: タブレット */
@media (max-width: 1024px) {
  .tiktok-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

/* レスポンシブ: スマートフォン */
@media (max-width: 768px) {
  .tiktok-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
