/* ==========================================================================
   Components.css — Header/Nav, Footer, Fixed CTA, CTA Banner, Hero, Cards
   ※ base.cssに統合済み：ボタン、ユーティリティ、メディアクエリ
   ========================================================================== */

/* ========== Header / Navigation ========== */
.header {
  /* 既存のスタイル */
  background-color: var(--background-white);
  border-bottom: 1px solid var(--border-gray);
  padding: 1rem 0;
  z-index: 999;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  
  /* 固定ヘッダーのルールを追加 */
  position: fixed;
  top: 0;
  width: 100%;
}

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

.logo a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-blue);
  text-decoration: none;
  transition: color 0.3s ease;
}
.logo a:hover {
  color: var(--primary-blue-light);
}

/* desktop nav */
.nav {
  display: flex;
  gap: 1.5rem;
}
.nav a {
  text-decoration: none;
  color: #374151;
  font-weight: 500;
  transition: color 0.3s ease, background-color 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
}
.nav a:hover {
  color: var(--primary-blue);
  background-color: #f0f4ff;
}

/* hamburger button (mobile) */
.nav-toggle {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  color: #475569;
  cursor: pointer;
  z-index: 101;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: background-color 0.3s ease;
}
.nav-toggle:hover {
  background-color: #f1f5f9;
}

/* ========== Footer ========== */
.footer {
  background: var(--text-primary);
  color: var(--background-white);
  padding: var(--spacing-3xl) 0 var(--spacing-xl);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
  gap: var(--spacing-2xl);
  margin-bottom: var(--spacing-2xl);
}

.footer-section h3 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
  color: var(--background-white);
}

.footer-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-section ul li { margin-bottom: var(--spacing-sm); }
.footer-section ul li a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: var(--font-size-sm);
}
.footer-section ul li a:hover { color: var(--background-white); }

.footer-bottom {
  border-top: 1px solid var(--text-muted);
  padding-top: var(--spacing-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.footer-links {
  display: flex;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--text-light);
  font-size: var(--font-size-sm);
  transition: color 0.3s ease;
}
.footer-links a:hover { color: var(--background-white); }

/* ========== Fixed CTA (scroll-in) ========== */
.fixed-cta-container {
  position: fixed;
  right: -300px;              /* 初期は画面外 */
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  transition: right 0.3s ease-in-out;
}
.fixed-cta-container.show { right: 20px; }

.fixed-cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.fixed-cta-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
  min-width: 160px;
  justify-content: center;
}

/* Email */
.email-btn {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: var(--background-white);
}
.email-btn:hover {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59,130,246,0.4);
}

/* LINE */
.line-btn {
  background: linear-gradient(135deg, #06c755, #05a847);
  color: var(--background-white);
}
.line-btn:hover {
  background: linear-gradient(135deg, #05a847, #048639);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(6,199,85,0.4);
}

/* ========== CTA Banner ========== */
.cta-banner {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #f97316 100%);
  padding: 5rem 1rem;
  text-align: center;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  margin-top: 4rem;
}

/* デコ要素（回転は animations.css の keyframes を使用） */
.cta-banner::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  background: rgba(255,255,255,0.1);
  top: -150px;
  right: -150px;
  border-radius: 50%;
  /* animation: rotateGlow 25s linear infinite;  ← animations.css で定義 */
  z-index: 0;
}

.cta-banner h2 {
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  position: relative;
  z-index: 2;
}

.cta-banner p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 2;
  color: #ffffff;
}

.cta-buttons-wrapper {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
  position: relative;
  z-index: 2;
}

.cta-btn {
  min-width: 220px;
  padding: 1.25rem 2rem;
  font-size: 1.125rem;
  border-radius: 9999px;
  font-weight: 700;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1),
              0 4px 6px -2px rgba(0,0,0,0.05);
  transition: all 0.3s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.cta-btn:hover {
  transform: scale(1.05) translateY(-3px);
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1),
              0 10px 10px -5px rgba(0,0,0,0.04);
}

/* ========== Page Hero ========== */
.hero {
  position: relative;
  background: linear-gradient(135deg, #1e3a8a, #3b82f6, #ffffff);
  padding: 6rem 0 4rem;
  text-align: center;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.hero-background {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(219,234,254,0.3), rgba(239,246,255,0.2));
  z-index: 0;
  opacity: 0.6;
}

/* 粒子・光の装飾（実アニメは animations.css で） */
.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  transform: translate(-50%,-50%);
  background: radial-gradient(circle,
    rgba(255,255,255,0.8) 0%,
    rgba(255,255,255,0.4) 30%,
    rgba(255,255,255,0.1) 60%,
    transparent 100%);
  border-radius: 50%;
  z-index: 1;
  /* animation: centralGlow 8s ease-in-out infinite; */
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  /* ドットパターンは任意：必要なら data-URI を背景に指定 */
  z-index: 1;
  /* animation: ideasToLight 12s ease-in-out infinite; */
}

.hero-container {
  position: relative;
  z-index: 2;
  background: rgba(255,255,255,0.9);
  padding: 3rem 2rem;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1), 0 0 60px rgba(255,255,255,0.3);
  backdrop-filter: blur(10px);
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 1rem;
  /* animation: fadeInUp 1s ease-out; */
  text-shadow: 0 2px 4px rgba(30,58,138,0.1);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: #374151;
  margin-bottom: 2rem;
  line-height: 1.7;
  /* animation: fadeInUp 1s ease-out 0.2s both; */
  text-shadow: 0 1px 2px rgba(55,65,81,0.1);
}

.hero-cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  /* animation: fadeInUp 1s ease-out 0.4s both; */
}

.hero-cta {
  font-size: 1.1rem;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  min-width: 200px;
}

/* ========== Cards (汎用) ========== */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: var(--spacing-xl);
}
.card {
  background: var(--background-white);
  border: 1px solid var(--border-gray);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  padding: var(--spacing-lg);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-blue);
  box-shadow: var(--shadow-md);
}
.card__title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}
.card__desc {
  color: var(--text-secondary);
  font-size: var(--font-size-base);
  line-height: 1.7;
  margin-bottom: var(--spacing-md);
}
.card__actions {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

/* Services レイアウト（必要に応じて使用） */
.services-section {
  background: var(--background-white);
  border-top: 1px solid var(--border-gray);
  border-bottom: 1px solid var(--border-gray);
}
.services-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px,1fr));
  gap: var(--spacing-xl);
  margin-top: var(--spacing-2xl);
}
.service-category {
  background: var(--background-gray-50);
  padding: var(--spacing-xl);
  border: 1px solid var(--border-gray);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-category:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.service-heading {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: var(--spacing-lg);
  text-align: center;
}
.service-item {
  padding: var(--spacing-lg);
  border: 1px solid var(--border-gray);
  border-radius: var(--radius-md);
  background: var(--background-white);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.service-item img {
  margin-bottom: var(--spacing-sm);
  border-radius: var(--radius-sm);
}
.service-description {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
  font-weight: 500;
}

/* Accordion (サービス詳細) */
.accordion-toggle {
  background: var(--primary-blue);
  color: var(--background-white);
  border: none;
  padding: var(--spacing-xs) var(--spacing-lg);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--font-size-sm);
  font-weight: 600;
  transition: all 0.3s ease;
}
.accordion-toggle:hover {
  background: var(--primary-blue-hover);
  transform: translateY(-1px);
}
.accordion-content {
  margin-top: var(--spacing-md);
  padding-left: var(--spacing-lg);
  list-style-type: disc;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.6;
  display: none; /* JSで .is-open 等に切替 */
  text-align: left;
}

/* ========== Responsive (components専用) ========== */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 768px) {
  /* ナビ */
  .nav-toggle { display: block; }
  .nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    right: 0;
    background: var(--background-white);
    width: 100%;
    border-top: 1px solid #e2e8f0;
    padding: 1rem 0;
    z-index: 100;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  }
  .nav.show { display: flex; }
  .nav a {
    margin: 0.5rem 0;
    padding: 1rem;
    border-bottom: 1px solid var(--background-gray-100);
  }

  /* 固定CTA はボトムへ */
  .fixed-cta-container {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    top: auto;
    right: auto;
    width: 90%;
    max-width: 400px;
  }
  .fixed-cta-container.show { bottom: 20px; }
  .fixed-cta-buttons {
    flex-direction: row;
    justify-content: space-between;
  }
  .fixed-cta-btn {
    flex: 1;
    min-width: auto;
    font-size: 0.8rem;
    padding: 0.6rem 0.8rem;
  }

  /* Hero */
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  .hero-cta {
    width: 100%;
    max-width: 280px;
  }

  /* Cards / Services */
  .cards { grid-template-columns: 1fr; }
  .services-wrapper {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .footer-links { justify-content: center; }
}

@media (max-width: 480px) {
  .cta-banner { padding: 4rem 1rem; }
  .cta-banner h2 { font-size: var(--font-size-2xl); }
  .service-category { padding: var(--spacing-lg); }
  .hero { padding: 4rem 0 3rem; }
}