/* ========================================
   components.css - 共通コンポーネント
   ServiceCard, PdfModal, StepFlow, FadeInText
   ======================================== */

/* サービスカード */
.service-card {
  display: block;
  text-decoration: none;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
  transform: translateY(-5px);
}

.service-title {
  padding: 1.2rem 1.5rem;
  margin: 0;
  font-size: 1.1rem;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
}

.service-title .icon {
  width: 16px;
  height: 16px;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.service-image {
  margin: 0;
  width: 100%;
  overflow: hidden;
}

.service-card.large .service-image {
  height: 190px;
}

.service-card.small .service-image {
  height: 110px;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.service-card:hover .service-image img {
  transform: scale(1.05);
}

.service-description {
  padding: 1.2rem 1.5rem;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #333;
}

/* PDFモーダル オーバーレイ */
.pdf-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  overflow: hidden;
}

.pdf-modal-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* PDFモーダル コンテンツ */
.pdf-modal-content {
  background: var(--color-bg-primary);
  border-radius: 12px;
  width: 90vw;
  max-width: 1200px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ヘッダー */
.pdf-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--color-border-light);
}

.pdf-modal-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--color-text-primary);
  margin: 0;
}

.pdf-modal-close {
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.pdf-modal-close:hover {
  background-color: var(--color-bg-secondary);
  color: var(--color-text-primary);
}

/* コントロールバー */
.pdf-modal-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1.5rem;
  background-color: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border-light);
  gap: 0.75rem;
}

.pdf-page-controls,
.pdf-zoom-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pdf-control-btn {
  padding: 0.35rem 0.75rem;
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border-light);
  border-radius: 4px;
  color: var(--color-text-primary);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.pdf-control-btn:hover:not(:disabled) {
  background-color: var(--color-button-primary);
  border-color: var(--color-primary);
}

.pdf-control-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pdf-page-info {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  font-weight: 500;
  min-width: 70px;
  text-align: center;
}

/* PDFビューワーエリア */
.pdf-modal-viewer {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1rem;
  background-color: #f0f0f0;
  -webkit-overflow-scrolling: touch;
}

.pdf-modal-viewer iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ローディング */
.pdf-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--color-text-secondary);
}

.pdf-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--color-border-light);
  border-top: 4px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.pdf-loading p {
  font-size: 1rem;
  margin: 0;
}

/* エラー表示 */
.pdf-error {
  padding: 3rem;
  text-align: center;
  color: #d32f2f;
}

.pdf-error p {
  font-size: 1.1rem;
  margin: 0;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .pdf-modal-content {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }

  .pdf-modal-header {
    padding: 1rem;
  }

  .pdf-modal-title {
    font-size: 1.2rem;
  }

  .pdf-modal-controls {
    flex-direction: column;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }

  .pdf-page-controls,
  .pdf-zoom-controls {
    width: 100%;
    justify-content: center;
  }

  .pdf-control-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }

  .pdf-modal-viewer {
    padding: 1rem;
  }
}

/* スクロールバーのスタイル */
.pdf-modal-viewer::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.pdf-modal-viewer::-webkit-scrollbar-track {
  background: #e0e0e0;
}

.pdf-modal-viewer::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 5px;
}

.pdf-modal-viewer::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-primary);
}

/* ステップフローコンテナ */
.step-flow {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 2rem 0;
}

/* ステップアイテム */
.step-flow-item {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}

/* 左側のステップ番号SVG */
.step-flow-left {
  flex-shrink: 0;
}

.step-number-svg {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

/* ステップ画像 */
.step-flow-image {
  flex-shrink: 0;
  width: 200px;
  height: 150px;
  overflow: hidden;
  border-radius: 8px;
}

.step-flow-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* コンテンツエリア */
.step-flow-content {
  flex: 1;
}

/* タイトル */
.step-flow-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  margin: 0 0 0.5rem 0;
}

/* 横長の線 */
.step-flow-divider {
  width: 100%;
  height: 2px;
  background-color: #888;
  margin-bottom: 1rem;
}

/* 説明 */
.step-flow-description {
  font-size: 1rem;
  color: #666;
  line-height: 1.8;
  margin: 0;
  white-space: pre-line;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .step-flow {
    gap: 2rem;
  }

  .step-flow-item {
    flex-direction: column;
    gap: 1rem;
  }

  .step-number-svg {
    width: 40px;
    height: 40px;
  }

  .step-flow-image {
    width: 100%;
    height: 200px;
  }

  .step-flow-title {
    font-size: 1.2rem;
  }

  .step-flow-description {
    font-size: 0.95rem;
  }
}

/* フェードインテキスト */
.fade-in-text-wrapper {
  display: inline-block;
}

.fade-in-char,
.fade-in-char-hidden {
  display: inline-block;
}

.fade-in-char {
  opacity: 0;
  animation: fadeInChar 0.5s ease-in forwards;
}

.fade-in-char-hidden {
  opacity: 0;
}

@keyframes fadeInChar {
  to {
    opacity: 1;
  }
}

/* ========================================
   ContactCTA - お問い合わせセクション
   ======================================== */
.contact-cta-section {
  background-color: #fff;
  padding: 60px 2rem 80px;
}

.contact-cta-text {
  font-size: 24px;
  color: #333;
  text-align: center;
  margin: 0 0 20px 0;
  font-weight: 400;
}

.contact-buttons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
}

.contact-cta-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 30px;
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}
.button-icon {
  font-size: 1.2em;
  font-weight: bold;
}

/* ContactCTA レスポンシブ対応 */
@media (max-width: 768px) {
  .contact-cta-section {
    padding: 50px 1rem 60px;
  }

  .contact-cta-text {
    font-size: 14px;
    margin-bottom: 30px;
  }

  .contact-buttons-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .contact-cta-button {
    padding: 18px 24px;
    font-size: 15px;
  }
}
