/* ========================================
   行政書士事務所 宮川元一 - 共通スタイル
   縦長・章区切り・画像バナー型レイアウト
   参考：gm747.jimdoweb.com の型
======================================== */

/* --- リセット & ベース --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  font-size: 16px;
  line-height: 1.85;
  color: #1a1a1a;
  background: #fff;
}

img { max-width: 100%; height: auto; display: block; }
a { color: #1a4fa0; text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.5em; }

/* --- ナビゲーション --- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 2px solid #1a4fa0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
}

.site-nav .nav-logo {
  font-size: 1rem;
  font-weight: 700;
  color: #1a4fa0;
  white-space: nowrap;
  line-height: 1.3;
}

.site-nav .nav-logo span {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: #555;
}

.nav-links {
  display: flex;
  list-style: none;
  padding: 0;
  gap: 0;
}

.nav-links li a {
  display: block;
  padding: 0 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 64px;
  border-left: 1px solid #e8e8e8;
  transition: background 0.15s, color 0.15s;
}

.nav-links li a:hover,
.nav-links li a.active {
  background: #1a4fa0;
  color: #fff;
  text-decoration: none;
}

.nav-cta a {
  display: inline-block;
  background: #c0392b;
  color: #fff !important;
  padding: 0.55rem 1.2rem;
  border-radius: 3px;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  margin-left: 1rem;
  transition: background 0.15s;
}

.nav-cta a:hover { background: #96281b; text-decoration: none; }

/* ハンバーガー */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #1a1a1a;
  transition: all 0.25s;
}

/* --- ヒーローバナー（各ページ上部） --- */
.page-hero {
  width: 100%;
  background: #1a4fa0;
  color: #fff;
  text-align: center;
  padding: 3.5rem 1.5rem 3rem;
}

.page-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.page-hero p {
  font-size: 1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* トップ専用ヒーロー */
.hero-top {
  position: relative;
  width: 100%;
  background: linear-gradient(135deg, #0d2e6e 0%, #1a4fa0 60%, #2563c0 100%);
  color: #fff;
  padding: 5rem 1.5rem 4.5rem;
  text-align: center;
  overflow: hidden;
}

.hero-top::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/hero-top.webp') center/cover no-repeat;
  opacity: 0.22;
}

.hero-top .hero-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }

.hero-top h1 {
  font-size: clamp(1.7rem, 5vw, 2.8rem);
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.hero-top p {
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  line-height: 1.8;
  margin-bottom: 2rem;
  opacity: 0.93;
}

.btn-primary {
  display: inline-block;
  background: #c0392b;
  color: #fff;
  padding: 1rem 2.5rem;
  border-radius: 4px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: background 0.15s, transform 0.15s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: #96281b;
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: #fff;
  padding: 0.9rem 2rem;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid rgba(255,255,255,0.7);
  margin-left: 1rem;
  transition: all 0.15s;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.15);
  text-decoration: none;
}

/* --- メインコンテンツ幅 --- */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- セクション共通 --- */
.section {
  padding: 3.5rem 1.5rem;
}

.section-narrow {
  max-width: 860px;
  margin: 0 auto;
}

/* セクション見出し（章タイトル） */
.section-title {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 700;
  color: #0d2e6e;
  border-left: 5px solid #1a4fa0;
  padding-left: 0.85rem;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.section-title.center {
  border-left: none;
  text-align: center;
  padding-left: 0;
}

.section-title.center::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: #1a4fa0;
  margin: 0.6rem auto 0;
}

/* --- 画像バナー区切り（参考サイトの"章間画像"） --- */
.img-banner {
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.img-banner img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* 画像プレースホルダー（後から差し替え） */
.img-placeholder {
  width: 100%;
  background: linear-gradient(135deg, #dce8f7 0%, #b8d0f0 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #2255a0;
  font-size: 0.85rem;
  padding: 1rem;
  text-align: center;
}

.img-placeholder .ph-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

.img-placeholder .ph-ratio {
  font-weight: 700;
  font-size: 1rem;
  color: #1a4fa0;
  margin-bottom: 0.25rem;
}

.img-placeholder .ph-prompt {
  font-size: 0.75rem;
  color: #4477bb;
  max-width: 600px;
  line-height: 1.5;
}

/* 16:9 */
.ph-16x9 { padding-top: 0; height: 320px; }
/* 4:3 */
.ph-4x3 { padding-top: 0; height: 220px; }
/* 1:1 */
.ph-1x1 { height: 200px; width: 200px; border-radius: 50%; }

/* --- 注意事項ボックス（参考サイトの〔　〕ブロック） --- */
.notice-box {
  background: #fff8e1;
  border: 1px solid #f0c040;
  border-left: 5px solid #e6a800;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  border-radius: 2px;
}

.notice-box .notice-title {
  font-size: 1rem;
  font-weight: 700;
  color: #7a4f00;
  margin-bottom: 0.75rem;
}

.notice-box p, .notice-box li {
  font-size: 0.925rem;
  line-height: 1.85;
  color: #4a3a00;
}

/* --- 重要情報ボックス（青系） --- */
.info-box {
  background: #edf3fc;
  border: 1px solid #b0c8f0;
  border-left: 5px solid #1a4fa0;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  border-radius: 2px;
}

.info-box .info-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0d2e6e;
  margin-bottom: 0.75rem;
}

/* --- テーブル --- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.925rem;
  margin: 1.5rem 0;
}

.data-table th {
  background: #1a4fa0;
  color: #fff;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e0e8f5;
  vertical-align: top;
}

.data-table tr:nth-child(even) td { background: #f5f8fd; }
.data-table tr:hover td { background: #eaf0fc; }

/* --- カード（サービス一覧等） --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.card {
  border: 1px solid #d0dcf0;
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.15s;
  background: #fff;
}

.card:hover {
  box-shadow: 0 6px 20px rgba(26,79,160,0.12);
  transform: translateY(-3px);
}

.card .card-img {
  width: 100%;
  overflow: hidden;
}

.card .card-img img,
.card .card-img .img-placeholder {
  width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: center;
}

.card .card-body {
  padding: 1.25rem;
}

.card .card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0d2e6e;
  margin-bottom: 0.5rem;
}

.card .card-text {
  font-size: 0.875rem;
  color: #444;
  line-height: 1.75;
}

.card .card-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a4fa0;
}

/* --- CTAバナー（各ページ末） --- */
.cta-section {
  background: linear-gradient(135deg, #0d2e6e 0%, #1a4fa0 100%);
  color: #fff;
  text-align: center;
  padding: 3.5rem 1.5rem;
}

.cta-section h2 {
  font-size: clamp(1.3rem, 3.5vw, 1.8rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-section p {
  font-size: 0.975rem;
  opacity: 0.9;
  margin-bottom: 1.75rem;
  line-height: 1.8;
}

/* --- アコーディオン（FAQ） --- */
.accordion { margin: 1rem 0; }

.accordion-item {
  border-bottom: 1px solid #d8e4f5;
}

.accordion-btn {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 1.1rem 2rem 1.1rem 0;
  font-size: 0.975rem;
  font-weight: 600;
  color: #0d2e6e;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: color 0.15s;
}

.accordion-btn::after {
  content: '＋';
  font-size: 1.2rem;
  font-weight: 400;
  color: #1a4fa0;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.accordion-btn.open::after { content: '－'; }

.accordion-content {
  display: none;
  padding: 0 0 1.25rem 0;
  font-size: 0.925rem;
  color: #333;
  line-height: 1.85;
}

.accordion-content.open { display: block; }

/* --- ステップ（フロー） --- */
.steps {
  counter-reset: step;
  margin: 1.5rem 0;
}

.step-item {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  align-items: flex-start;
}

.step-num {
  counter-increment: step;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1a4fa0;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-body { flex: 1; }

.step-body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #0d2e6e;
  margin-bottom: 0.35rem;
}

.step-body p {
  font-size: 0.9rem;
  color: #444;
  line-height: 1.75;
}

/* --- フォーム --- */
.contact-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #222;
  margin-bottom: 0.35rem;
}

.contact-form .required {
  color: #c0392b;
  font-size: 0.75rem;
  margin-left: 0.35rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #c8d8f0;
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #1a1a1a;
  background: #fff;
  transition: border-color 0.15s;
  margin-bottom: 1.25rem;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #1a4fa0;
  box-shadow: 0 0 0 3px rgba(26,79,160,0.1);
}

.contact-form textarea { min-height: 140px; resize: vertical; }

.contact-form .submit-btn {
  background: #1a4fa0;
  color: #fff;
  border: none;
  padding: 1rem 3rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.contact-form .submit-btn:hover {
  background: #0d2e6e;
  transform: translateY(-2px);
}

.form-success {
  display: none;
  background: #e8f5e9;
  border: 1px solid #81c784;
  border-radius: 4px;
  padding: 1.5rem;
  text-align: center;
  font-weight: 600;
  color: #2e7d32;
  margin-top: 1rem;
}

/* --- 料金バッジ --- */
.price-badge {
  display: inline-block;
  background: #1a4fa0;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.price-note {
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.5rem;
}

/* --- タグ（在留資格など） --- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tag {
  background: #edf3fc;
  color: #1a4fa0;
  border: 1px solid #b0c8f0;
  border-radius: 3px;
  padding: 0.3rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 500;
}

/* --- 区切り線 --- */
hr.divider {
  border: none;
  border-top: 1px solid #e0e8f5;
  margin: 2.5rem 0;
}

/* --- フッター --- */
.site-footer {
  background: #0d2e6e;
  color: #ccd8f0;
  padding: 3rem 1.5rem 2rem;
  font-size: 0.875rem;
}

.footer-inner {
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.footer-brand .footer-logo {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.footer-brand p { line-height: 1.75; color: #a0b4d8; font-size: 0.85rem; }

.footer-nav h4 {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.footer-nav ul { list-style: none; padding: 0; }
.footer-nav ul li { margin-bottom: 0.4rem; }
.footer-nav ul li a { color: #a0b4d8; font-size: 0.85rem; }
.footer-nav ul li a:hover { color: #fff; text-decoration: none; }

.footer-contact h4 {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.footer-contact .tel-placeholder {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}

.footer-contact .addr-placeholder {
  color: #a0b4d8;
  font-size: 0.825rem;
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.footer-copyright {
  max-width: 860px;
  margin: 1.5rem auto 0;
  text-align: center;
  color: #7090b8;
  font-size: 0.8rem;
}

/* --- ユーティリティ --- */
.text-center { text-align: center; }
.text-small { font-size: 0.875rem; }
.text-red { color: #c0392b; }
.text-blue { color: #1a4fa0; }
.text-muted { color: #666; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ============================================================
   レスポンシブ
============================================================ */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 2px solid #1a4fa0;
    padding: 0.5rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  .nav-links li a {
    line-height: 1;
    padding: 0.9rem 1.5rem;
    border-left: none;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
  }
  .nav-cta { display: none; }
  .hamburger { display: flex; }
  .site-nav { position: relative; }

  .hero-top { padding: 3.5rem 1rem 3rem; }
  .btn-secondary { display: none; }

  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }

  .card-grid { grid-template-columns: 1fr; }

  .img-banner img { height: 180px; }

  .section { padding: 2.5rem 1rem; }
}

@media (max-width: 480px) {
  .page-hero { padding: 2.5rem 1rem 2rem; }
  .cta-section { padding: 2.5rem 1rem; }
  .data-table { font-size: 0.825rem; }
  .data-table th, .data-table td { padding: 0.6rem 0.75rem; }
}
